@maps.huge.info thank you :)
On Feb 17, 2:38 pm, "maps.huge.info [Maps API Guru]" <[email protected]> wrote: > This isn't really the best place to post discussions about PostGIS. > > Just a guess, but it sounds like you're using the wrong function. Try > these: > > select st_distance_spheroid(st_pointfromtext('POINT(-90 34)', > 4326),st_pointfromtext('POINT(-90 35)',4326),'SPHEROID["WGS 84", > 6378137,298.257223563]') ; > > Answer: 110931.459462688 (meters) > > or > > select st_distance_sphere(st_pointfromtext('POINT(-90 34)', > 4326),st_pointfromtext('POINT(-90 35)',4326)) ; > > Answer: 111194.697731682 (meters) > > Google's fromDistance: > > var test = new GLatLng(34,-90) ; > alert( test.distanceFrom(new GLatLng(35,-90)) ) ; > > Answer: 111319.49079327301 > > All three are pretty close, but not exact. Google uses a Haversine > formula, I don't know what PostGIS uses, but I would bet it's more > accurate. > > -John Coryat > > http://maps.huge.info > > http://www.usnaviguide.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
