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.g...@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@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users