[postgis-users] Scripts to update spatial_ref_sys.sql?
Frank Warmerdam
warmerdam at pobox.com
Tue Jan 1 17:00:08 PST 2008
Robert Coup wrote:
> Hi All,
>
> I understand from the archives that spatial_ref_sys is created from the
> Proj.4 data? Are there any scripts around to automate this process? (my
> digging around svn didn't find anything).
Rob,
GDAL/OGR includes a script called epsg_tr.py that makes it relatively easy
to translate from epsg codes to various formats. You can product PROJ.4
init files like:
epsg_tr.py -proj4 -skip -list ~/gdal/data/pcs.csv
Or SQL suitable for PostGIS using:
epsg_tr.py -proj4 -skip -list ~/gdal/data/pcs.csv
You will likely want to do this for pcs.csv (all the projected coordinate
systems) and gcs.csv (all the geographic coordinate systems). The .csv files
are part of the GDAL/OGR source distribution and are often installed in
/usr/local/share/gdal on linux/unix.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the postgis-users
mailing list