[GIS] Storing polygons in PostGIS (data coming from shapefiles)

postgisshapefile

We want to store data from shape files in PostGIS all in one table.

There will be two columns in the table:

  • boundary – The polygon data (How do we store this?)
  • mongo_id – Links to a mongo database

It seems if we use shp2postgis it creates a whole set of tables for that shapefile. We want to use one table for all boundary data.

What is the best way to do this? (Do we need to use a specific srid?)

Best Answer

I am assuming that by shp2postgis you actually mean shp2pgsql. If so, then the -a option will append your data into an existing table rather than replacing the data.