Created
May 19, 2013 21:05
-
-
Save mojodna/5609010 to your computer and use it in GitHub Desktop.
Importing Natural Earth into PostGIS w/ ogr2ogr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
P900913="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs" | |
EXTENT="-180 -85.05112878 180 85.05112878" | |
ogr2ogr --config PG_USE_COPY YES --config OGR_ENABLE_PARTIAL_REPROJECTION TRUE --config SHAPE_ENCODING WINDOWS-1252 -t_srs "$P900913" -lco ENCODING=UTF-8 -lco SRID=900913 -clipsrc $EXTENT -segmentize 1 -skipfailures -f PGDump /vsistdout/ ne_10m_populated_places.shp | pv | psql -d natural_earth -q |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment