[postgis-users] distance in miles

mark rkmr.em at gmail.com
Sun Feb 18 09:32:03 PST 2007


Thanks! It works great
mark

On 2/18/07, P Kishor <punkish at eidesis.org> wrote:
> On 2/18/07, mark <rkmr.em at gmail.com> wrote:
> > 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))
>
> SELECT *, (distance(transform(pt_geometry,26986),
> transform(geometryfromtext('POINT(-79.893490 40.068770)', 4269),
> 26986))) * 0.000621371) AS distance
> FROM mytable
>
> --
> Puneet Kishor http://punkish.eidesis.org/
> Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
> Open Source Geospatial Foundation http://www.osgeo.org/education/
> ---------------------------------------------------------------------
> collaborate, communicate, compete
> =====================================================================
> _______________________________________________
> 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