Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have already created a geometry table in postgis. I want to load several shapefiles into that table using ogr2ogr. But I didn't find the parameter which could specify that table.

ogr2ogr -append -f "PostgreSQL" PG:"dbname=db and so on" shapefile.shp 

That's it. How can I add some parameter to specify the table?

share|improve this question

use the flag -nln to specify the name of your target table

share|improve this answer
Another Question regarding that: Can I add some parameter using this command. Such as the user defined ID ? – Yu Guo May 15 '13 at 17:09

To be explicit about nickves' answer:

ogr2ogr -append -f "PostgreSQL" PG:"dbname=db" shapefile.shp -nln mytable 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.