Error importing Shapefile to PostGIS using Importer GUI

المشرف العام

Administrator
طاقم الإدارة
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:



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. I tried tweaking a few paramaters, but I'm not sure what I'm doing.

Are there any good tutorials or instructions about how to do this? I'm using Windows 7 64 bit.

Just adding a little more of my error message.

Shapefile import failed. Connection: host=localhost port=5432 user=postgres password='**' Destination: public.Area Source File: D:\files\Area Shapefile type: Polygon Postgis type: MULTIPOLYGON[2] Failed SQL begins: "SET CLIENT_ENCODING TO UTF8; SET STANDARD_CONFORMING_STRINGS TO ON; BEGIN; CREATE TABLE "public"."Area" (gid serial PRIMARY KEY, "fid_1" int4, "area" numeric, "dtm" float8, "dsm" float8, "hgt" float8, "nat_area" numeric, "nat_peri" numeric, "nat_vol" num" Failed in pgui_exec(): ERROR: type "geography" does not exist LINE 14: "the_geom" geography(MULTIPOLYGON,4326)); ^

Shapefile import failed.

I've tried running @MerseyViking's suggestion, and then importing again. In the Geometry Column: box I chose MULTIPOLYGON and then tried to import the projected shapefile. The following errors appeared:

Failed SQL begins: "CREATE INDEX "NeighborCheck_MULTIPOLYGON_gist" ON "public"."NeighborCheck" using gist ("MULTIPOLYGON" gist_geometry_ops);COMMIT;"Failed in pgui_exec(): ERROR: current transaction is aborted, commands ignored until end of transaction blockShapefile import failed.Then I tried ticking the Load into GEOGRAPHY column box in Options, and received the following error:

Failed SQL begins: "CREATE INDEX "NeighborCheck_MULTIPOLYGON_gist" ON "public"."NeighborCheck" using gist ("MULTIPOLYGON" gist_geography_ops);COMMIT;"Failed in pgui_exec(): ERROR: current transaction is aborted, commands ignored until end of transaction blockShapefile import failed.Both error messages are identical and I don't quite understand them.



أكثر...
 
أعلى