[postgis-users] Projection(s) for global point-and-radius searches

Paul Ramsey pramsey at opengeo.org
Wed Jul 7 12:25:13 PDT 2010


No, it works directly on the sphere, both for the indexes and the
calculations (for a select list of functions):

ST_AsText(geography) returns text
ST_GeographyFromText(text) returns geography
ST_AsBinary(geography) returns bytea
ST_GeogFromWKB(bytea) returns geography
ST_AsSVG(geography) returns text
ST_AsGML(geography) returns text
ST_AsKML(geography) returns text
ST_AsGeoJson(geography) returns text
ST_Distance(geography, geography) returns double
ST_DWithin(geography, geography, float8) returns boolean
ST_Area(geography) returns double
ST_Length(geography) returns double
ST_Covers(geography, geography) returns boolean
ST_CoveredBy(geography, geography) returns boolean
ST_Intersects(geography, geography) returns boolean
ST_Buffer(geography, float8) returns geography
ST_Intersection(geography, geography) returns geography

On Wed, Jul 7, 2010 at 12:19 PM, David Jantzen <djantzen at ql2.com> wrote:
> Sweet!  It must do on-the-fly projections under the covers, right?  That's a huge improvement since I used PostGIS last time.
>
> On Jul 7, 2010, at 11:40 AM, Paul Ramsey wrote:
>
>> David,
>>
>> Consider using the GEOGRAPHY type if your queries are just going to be
>> ST_DWithin style. That will remove all projection issues.
>>
>> P.
>>
>> On Wed, Jul 7, 2010 at 11:19 AM, David Jantzen <djantzen at ql2.com> wrote:
>>> Hey All,
>>>
>>> It's been a couple years but happily I have a reason to work with PostGIS again!  I'm rusty, and this is pretty a basic question, so if you just specify the chapter in TFM I'll happily go read it.
>>>
>>> I need to do simple point-and-radius searches for some properties in Germany.  Very soon I'll need to do this same thing across Europe and North America, and some in Asia.  My understanding is that the accuracy of such measurements will degrade as I use projections covering larger and larger geographical areas.
>>>
>>> So, some questions:
>>> 1) Is there a single global projection that I could use for all such calculations?  How bad would the distortions be and where?
>>> 2) Assuming the correct path is to switch projections depending on area of focus, what are some strategies for this kind of dynamic switching in SQL queries?
>>>
>>> Thanks for your help (and patience),
>>> David
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> _______________________________________________
> 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