I installed both PostgreSQL and PostGIS. But I am not able to import a shapefile to the database? It gives an error, "Shapefile import failed". What am I doing wrong?
I opened the file with ArcGIS and did not find multiple gid fields.
-
2Hello. Welcome to GISSE. Will you please add the error message as text and in English please? Check out the tour to learn more about the best way to ask questions and get answers on this site.jbalk– jbalk2024年03月29日 16:47:40 +00:00Commented Mar 29, 2024 at 16:47
-
Did you add the postgis extension to the postgres database?Aquamarine– Aquamarine2024年03月29日 22:28:19 +00:00Commented Mar 29, 2024 at 22:28
-
Since ArcGIS tools can copy feature classes to PostgreSQL databases with PostGIS enabled without an enterprise geodatabase enabled, you might try creating a login, a schema to match the login name, and a connection file, then using that connection file as a target workspace, which could help you to triangulate your issue. Without a clearer indication of what is happening, we won't likely be able to help.Vince– Vince2024年03月30日 12:52:38 +00:00Commented Mar 30, 2024 at 12:52
1 Answer 1
Does your file already have a field called gid?
The shapefile loader is trying to create a unique primary key in the database called gid, so if a field called that already exists in the data it will fail.