[postgis-users] help with distance query

2008-10-15 Thread mark balman
Hi all again Thanks ever so much for your help David your suggestion works great! And thanks too MarkW for your help - exactly what I did but which kept giving me the error message: ERROR: column "azev2_1.the_geom" must appear in the GROUP BY clause or be used in an aggregate function SQL state:

Re: [postgis-users] help with distance query

2008-10-15 Thread MarkW
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]') FROMazev2_1 GROUP BY 1, 2 HAVING distance_spheroi

Re: [postgis-users] help with distance query

2008-10-15 Thread Jean David TECHER
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]'),sitename from azev2_1 group by 1,2,3 having distance_spheroid(GeomFromText('Point(-70 20)',4326),the_geom,'SPHER

[postgis-users] help with distance query

2008-10-15 Thread mark balman
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",637813

Re: [postgis-users] help with distance query

2008-10-15 Thread Jean David TECHER
Try this: 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]') < 25;

[postgis-users] help with distance query

2008-10-15 Thread mark balman
Hi all I am trying to work out how to return the distances from a user defined location but not too sure how. My query follows; select * from azev2_1 where distance_spheroid(GeomFromText('Point(-70 20)',4326),the_geom,'SPHEROID["WGS 84",6378137,298.257223563]') < 25; This provides all the po