On Tue, 2011-08-02 at 14:26 +0200, Frederik Ramm wrote: > On 08/02/11 14:13, kenneth gonsalves wrote: > > actually I am looking for an sql query. > > That would typically be done using the st_dwithin function. That > function internally makes a bounding box comparison, thereby taking > advantage of any geographic indexes you might have, and only then > checks > the actual distance.
I manufactured this SQL, but it selects *every* locality on the map: select name from planet_osm_point where place = 'locality' and ST_DWithin(way,(select way from planet_osm_point where name like 'Bangalore%' limit 1),300) order by name; any pointers? _______________________________________________ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk