[Proj] Relationship between proj4 and spatialreference.org

Howard Butler hobu.inc at gmail.com
Wed Jan 2 07:37:39 PST 2013


On Jan 2, 2013, at 8:41 AM, Jan Hartmann <j.l.h.hartmann at uva.nl> wrote:

> Hi Howard,
> 
> This is a problem, as OpenLayers looks by default to spatialreference.org when a projection has not been explicitly defined in the javascript code. This happens for example with the "displayProjection" item in the map controls. You get the wrong coordinates without being told that someting isn't right.

That seems like a rather fragile way of OpenLayers (OpenLayers does reprojection now, or is this still proj.js?)  to engineer things, especially considering sr.org's sometimes spotty uptime...

> 
> Is it very difficult to synchronize spatialreference.org with (e.g.) the proj epsg file? If I remember correctly, Frank has an automated updated  procedure from the epsg database. Could that procedure be extended to spatialreference.org? I would be willing to put some effort in it, as I am working on a geographical indexing system of our map library, and there are many historical maps in it with projections that are not in the epsg database. Spatialreference.org would be an ideal system for these maps, but it would only be workable if all information were up to date.

The synchronization isn't too big of a job, but it depends on having an up-to-date GDAL available in addition to proj.4. sr.org uses GDAL's OSR classes to do the translations of the SRS representations. For some SRS's that GDAL can't interpret, the GeoTools WKT representation is simply passed back to the client. There's some voodoo that Chris Schmidt did to support this, and I'm not exactly sure where the lines of demarcation are. Additionally, OSR has improved significantly in the 3+ years since this was developed, so it may be possible to remove this hand-rolled aspect altogether. Then there's the ESRI, Oracle, and Lunar/Mars SRSs that need to be updated.

sr.org is one of those things that everyone likes to use but is unable to attract an audience of caretakers to invest in learning and spending some time keeping it current. 

Howard






More information about the Proj mailing list