[postgis-users] help with distance query
MarkW
mark.wimer at gmail.com
Wed Oct 15 08:46:52 PDT 2008
You mean adding the field for output? Like this:
SELECT sitename,
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 ;
On Wed, Oct 15, 2008 at 11:16 AM, mark balman <mark.balman at gmail.com> wrote:
> 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
> _______________________________________________
> 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