[postgis-users] accuracy of coverage

Hugues François hugues.francois at irstea.fr
Wed May 1 12:04:59 PDT 2013


Hello,

I am not sure, but if i remember well, i think i read somewhere st_dwithin didn't work with geographies. Did you try the same st_dwithin in combination with st_transform to test the same spatial relation with the local srid or with google srid ?

Hugues.

-----Message d'origine-----
De : postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-bounces at lists.osgeo.org] De la part de Gold, Jack L (US SSA)
Envoyé : mercredi 1 mai 2013 20:34
À : PostGIS Users Discussion
Objet : Re: [postgis-users] accuracy of coverage

This 4000.0 is a double precision distance as defined by ST_DWithin ("The distance is specified in units defined by the spatial reference system of the rasters"), so it better not be degrees.

--Jack

-----Original Message-----
From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of b.j.kobben at utwente.nl
Sent: Wednesday, May 01, 2013 1:25 PM
To: postgis-users at lists.osgeo.org
Subject: Re: [postgis-users] accuracy of coverage

Since Gmaps uses not the geographic positions (lat-lon), but the feared "google maps projection" which has many geodetic problems, I would trust the PG calculation. However, are you sure the 4000 in your SQL will be interpreted as meters, not as 4000 decimal degrees (in that case the point will certainly always be inside, of course)?

Barend

--
Barend Köbben
Senior Lecturer, ITC - University of Twente, Faculty of Geo-Information Science and Earth Observation PO Box 217, 7500AE Enschede (The Netherlands)
+31-(0)53 4874 253
+++++++++++++++++++++++
FOSS4G 2013: Geo for All
Nottingham (UK), 17-21 Sep 2013
http://2013.foss4g.org
+++++++++++++++++++++++




On 01-05-13 17:15, "Gold, Jack L  (US SSA)" <jack.gold at baesystems.com>
wrote:

>I am trying to determine the accuracy of the ST_DWithin function.  I 
>have a position at 32.52550166, -84.96989441 and I want to know if it 
>is within a projected circle of 4km radius centered on 32.5, -85.
> 
>I am running the following query:
> 
>SELECT "id","location", ST_AsText(location) as "text_position" FROM 
>"positions" WHERE (ST_DWithin(location,
>ST_geographyFromText("SRID=4326;POINT(-85.0000035762821
>32.49999701976208)"), 4000.0))
> 
>³location² is defined as a geography
> 
> 
>When I map this out, Google Maps shows the position report outside of 
>the 4km ring as does my application, but the database is reporting that 
>the position is within the 4km range of the ring.  I suspect the error 
>is small, but I¹m wondering  where it lies.
> 
>Any ideas?
> 
>
> 
>

_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


More information about the postgis-users mailing list