0

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.

enter image description here

enter image description here

Vince
20.5k16 gold badges49 silver badges65 bronze badges
asked Mar 29, 2024 at 13:35
3
  • 2
    Hello. 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. Commented Mar 29, 2024 at 16:47
  • Did you add the postgis extension to the postgres database? Commented 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. Commented Mar 30, 2024 at 12:52

1 Answer 1

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.

answered May 24, 2024 at 12:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.