[postgis-users] User Friendly vs Explicit

Paul Ramsey pramsey at refractions.net
Fri May 6 09:54:16 PDT 2005


So, the whole Buffer('Lat Lon Geometry', planar distance) thing brings 
this up again: to what extent should PostGIS try to hide SRS issues from 
users? Hiding them generally means hacking around them, and the hacks 
could in some occasions give rise to things the users don't want. I am 
assuming here that we are not going to invest the time to do arbitrary 
geometric calculations on the spheroid.

For example, Buffer('Lat Long Geometry', planar distance) would have to:

- Look up the SRID of the goemetry in spatial_ref_sys
- Instantiate the proj4 definition, see if it includes a cartographic 
transformation
- If not, it's lat/lon so,
- Create a temporary TransverseMercator (?) projection centered on the 
geometry
- Reproject the geometry into that projection
- Run the buffer
- Projection the geometry back out into lat lon
- Return the result

There are two nastinesses here:

- the projection needs to be checked all the time now, even when we are 
already in a projected system, just to make sure we are not in the 
lat/lon case
- hidden "magic" is happening, and the magic is somewhat complex, 
including some assumptions (like doing the buffer in TM)

Thoughts?

P



More information about the postgis-users mailing list