[Gdal-dev] Proposed Feature: Consumption of URL-based Spatial
References
Howard Butler
hobu.inc at gmail.com
Mon Jul 23 16:08:01 EDT 2007
All,
Chris Schmidt and I have been working on a website <http://
spatialreference.org> that reflects the EPSG spatial reference codes
database and user-contributed codes in a variety of output formats.
The EPSG code database is never as up to date as you would like, and
we frequently tell people to hack their /usr/share/proj/epsg database
file with made up codes to support alternative projections. If we
could consume URL-based spatial references with OSR, all that would
be required is someone adds the custom coordinate system definition
to the site and then everyone could refer to it at that location
(hopefully indefinitely).
As for the website itself, if it has uptake and people find it
useful, we will work to put it somewhere it can live for a very long
time -- for example OSGeo. The source code (it's written in Django)
will be made available so anyone can stand up their own version of
the site.
I would like to propose that an ImportFromUrl() method be added to
OSRSpatialReference that constructs a spatial reference given the
SetFromUserInput data retrieved at the given URL. It would only need
to be as specific as that, and it wouldn't need to refer to
spatialreference.org. Additionally, this mechanism could be used to
support GML SRS retrieval from URLs (which Frank mentioned was in the
spec) in the future. This method would only be active if you have
included curl support, of course. Maybe someday, if necessary, we do
some magical caching, but that'd be a premature optimization at this
point.
Here's an example:
ogr2ogr -a_srs http://spatialreference.org/epsg/4326/proj4 -t_srs
http://spatialreference.org/user/6/proj4 world_borders.shp
world_borders_google.shp
Howard
More information about the Gdal-dev
mailing list