Re: [OSM-talk] all POIs within a specific radius

2011-08-09 Thread kenneth gonsalves
On Mon, 2011-08-08 at 07:34 +0100, Graham Jones wrote: These questions might get a better response on the Dev list as they are quite technical. but it is an end user question - I would not like to waste the time of the devs. I am not very good at postgis so I may be wrong, but you might be

Re: [OSM-talk] all POIs within a specific radius

2011-08-09 Thread Graham Jones
I'm glad you sorted it - I will find some time soon for the wiki page. The reason I suggested the dev list is that I know quite a few people do not subscribe to talk any more - your questions would not be out of place there, but it is up to you! Regards Graham. On 9 August 2011 09:49, kenneth

Re: [OSM-talk] all POIs within a specific radius

2011-08-08 Thread Frederik Ramm
Hi, On 08/08/11 07:51, kenneth gonsalves wrote: 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; Is it

Re: [OSM-talk] all POIs within a specific radius

2011-08-08 Thread kenneth gonsalves
On Mon, 2011-08-08 at 10:40 +0200, Frederik Ramm wrote: 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; Is it possible that your database is not in Mercator projection

Re: [OSM-talk] all POIs within a specific radius

2011-08-07 Thread kenneth gonsalves
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

Re: [OSM-talk] all POIs within a specific radius

2011-08-02 Thread Nathan Edgars II
On 8/2/2011 7:05 AM, kenneth gonsalves wrote: hi, how would I get all POIs within a specific radius (in metres) from a specific point by querying the osm db? If a square rather than a circle is fine, try XAPI: http://wiki.openstreetmap.org/wiki/Xapi .

Re: [OSM-talk] all POIs within a specific radius

2011-08-02 Thread Paul Hartmann
On 08/02/2011 01:05 PM, kenneth gonsalves wrote: hi, how would I get all POIs within a specific radius (in metres) from a specific point by querying the osm db? Any kind of POI or a certain list of tags? Have you tried the Overpass API? http://wiki.openstreetmap.org/wiki/Overpass_API#Around

Re: [OSM-talk] all POIs within a specific radius

2011-08-02 Thread kenneth gonsalves
On Tue, 2011-08-02 at 07:49 -0400, Nathan Edgars II wrote: On 8/2/2011 7:05 AM, kenneth gonsalves wrote: hi, how would I get all POIs within a specific radius (in metres) from a specific point by querying the osm db? If a square rather than a circle is fine, try XAPI:

Re: [OSM-talk] all POIs within a specific radius

2011-08-02 Thread kenneth gonsalves
On Tue, 2011-08-02 at 14:05 +0200, Paul Hartmann wrote: On 08/02/2011 01:05 PM, kenneth gonsalves wrote: hi, how would I get all POIs within a specific radius (in metres) from a specific point by querying the osm db? Any kind of POI or a certain list of tags? Have you tried the

Re: [OSM-talk] all POIs within a specific radius

2011-08-02 Thread Frederik Ramm
Hi, 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