Error importing Shapefile to PostGIS

by nischu   Last Updated August 14, 2019 08:22 AM - source

I'm trying to import a shapefile into a PostGIS database using the graphical importer. I just installed POSTGRESQL, and PostGIS. The GUI looks like this:

enter image description here

After testing that my database worked, I chose the shapefile that I wanted to upload, and then received a message that it had failed to import.

Are there any good tutorials or instructions about how to do this?

Thanks in advance.



Answers 1


I would recommend you to read this shp2pgsql_usage and this tutorial about loading spatial data.

As you see, -S key would try to generate simple geometries instead of MULTI geometries. BUT Will only succeed if all the geometries are actually single. Your case is multipolygon with 2 parts, so do not use -S.

When trying to import Multigeometries, I usually check Generate simple geometries instead of MULTI geometries in the Options (subsection 6 in the tutorial) so import is successful.

Jane
Jane
August 14, 2019 11:43 AM

Related Questions



Error import shapeFile shp2pgsql-gui

Updated May 20, 2017 21:22 PM


Can't import shapefile to PostGIS

Updated January 08, 2018 20:22 PM

Importing .shp to postgreSQL

Updated August 22, 2015 17:09 PM