[postgis-users] Data storage w.r.t. projections

Jeff Hoffmann jeff at propertykey.com
Mon Oct 9 14:29:24 PDT 2006


Mark Fredrickson wrote:
>>   As I understand it, one of the big advantages of UTM is that is allows
>>   for Euclidean geometry, as compared to spatial geometry that would be
>>   required for a lat,long format. Does PostGIS use this feature of UTM
>>   when computing Distance(), etc?
>>
>> That's a good question, and also what coordinate system the bounding
>> box calculations are in.
> 
> 
> I'll probably be doing a lot of geocoding of individuals, and then
> matching them against this database of district boundaries. I would
> also imagine I'll be doing a lot of "give me the 10 people closest to
> me" or "give me everyone within 10 miles" or similar type queries.
> 
> It is not expensive to translate individual points into a specific
> projection, but I would like to avoid large scale, repetitive
> transformations on the overall data set.
> 
> So it seems the question of whether PostGIS uses Euclidean geometry
> for UTM projections is unanswered?

The regular distance function just uses plain cartesian distance,
although you could use distance_spheroid if you're working with lat/lon. 
  I'm sure it's probably accurate enough for what you're using it for,
but more computationally intensive, so there is a tradeoff there.  As
for the "what's right for me" question, I think that's a big "it 
depends".  My preference would be to never have to reproject anything on 
the fly and my application would never have to check which projection I 
should be working with, so unless there's a specific reason to stick 
with it as is, I'd just reproject all of the data to whatever your 
chosen lat/lon projection is.

-- 
Jeff Hoffmann
Head Plate Spinner
PropertyKey.com




More information about the postgis-users mailing list