[postgis-users] User Friendly vs Explicit

Stephen Woodbridge woodbri at swoodbridge.com
Fri May 6 11:06:34 PDT 2005


Paul et al.,

I think for many of us that are new to PostGIS need this type of 
simplicity. Strk makes a good point about "Leaky Abstractions". So what 
would work for me is something that helps with the learning curve.

I think this is not unlike "Patterns" you guys think and breath this 
stuff everyday. Solution to problem are somewhat intuitive. It would be 
great if there were a "Cooking with PostGIS" recipe cook, OK, call it a 
FAQ of sorts that presents a task like below, discussion if it needed 
like how good the solution is or limits to its usefulness, and shows an 
example SQL. I especially like the real work examples that people post 
about.

With something like this, I could look for examples and patterns that I 
can apply to my problems. A good example is the current discussion of 
intersecting two circles in lat-long with radius in meters. I learned 
about how to do transforms and move data from one projection to another 
and back, buffer on a point to make a circle, exteriorring().

This is an amazing tool!

-Steve W.

Paul Ramsey wrote:
> 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
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 




More information about the postgis-users mailing list