[postgis-users] distance in miles

mark rkmr.em at gmail.com
Sun Feb 18 09:13:35 PST 2007


On 2/18/07, P Kishor <punkish at eidesis.org> wrote:
> On 2/18/07, mark <rkmr.em at gmail.com> wrote:
> > Which SRID should I use to transform geometry to get distance in
> > miles? RIght now I am using the SRID 26986 which is giving the
> > distance in metres.
> why not just multiply the answer by 0.000621371

This is my query. Can you tell how I can multiply this here:

SELECT *, distance(transform(pt_geometry,26986),
transform(geometryfromtext('POINT(-79.893490 40.068770)', 4269),
26986))
FROM mytable
WHERE expand(transform(geometryfromtext('POINT(-79.893490 40.068770)',
4269), 26986),8046.720000) && transform(pt_geometry, 26986)
AND distance(transform(pt_geometry, 26986),
transform(geometryfromtext('POINT(-79.893490 40.068770)', 4269),
26986)) <= 8046.720000
ORDER BY distance OFFSET 0 LIMIT 1000



More information about the postgis-users mailing list