문제

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 ?

도움이 되었습니까?

해결책 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 

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top