[postgis-users] help with distance query

mark balman mark.balman at gmail.com
Wed Oct 15 08:16:50 PDT 2008


Many thanks for your help David, it works!

select astext(the_geom),  distance_spheroid(GeomFromText('Point(-70
20)',4326),the_geom,'SPHEROID["WGS 84",6378137,298.257223563]') from
azev2_1  group  by 1,2 having
distance_spheroid(GeomFromText('Point(-70

20)',4326),the_geom,'SPHEROID["WGS 84",6378137,298.257223563]') <
250000;

What I need also is a field name from azev2_1 called sitename.. I am a
little bit confused as to where I need to put this in this query now?

Thanks again!

Mark



More information about the postgis-users mailing list