Question

Given a shp file such those from Gadm e.g. US administrative divisions, where the coordinate reference system is latitude/longitude with WGS84 datum.

Input could actually be:

  1. Shapefile,
  2. ESRI personal geodatabase,
  3. ESRI file geodatabase,
  4. Google Earth .kmz,
  5. R (SpatialPolygonsDataFrame)

How to convert this input into a WGS84 PostGIS dump ?

Was it helpful?

Solution 2

Gis.stackexchange.com cite an ogr2ogr way which may works :

ogr2ogr -overwrite -f "PostgreSQL" PG:"host=myhost user=myuser dbname=mydb password=mypass" my_file.shp 

OTHER TIPS

For shapefiles, use the shp2pgsql tool provided by PostGIS.

You'll probably need different tools for the other different formats. Here's one of many references on PostGIS Data import. It mentions ogr2ogr in particular.

Finally, there'll probably be better-informed answers on the repost of this question on gis.stackexchange.com.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top