[Accessibility] Finding the Nearest POI
andrzej zaborowski
balrogg at gmail.com
Tue Nov 17 18:18:53 GMT 2009
Hi,
2009/11/17 Alex Jurgensen <asquared21 at gmail.com>:
> Thank you for the useful information. My trouble is that I don't know how to search for the nearest POIs in all the dirrections. This is where the root of my problem stems from. I understand how to calculate the projection, or at least some of the theory behind it, but I am stubling on how to do this search of POIs.
There are a couple of possibilities, the easiest one is go through all
the POIs you currently have in memory, calculate the distance from
$here and choose the closest one. The more efficient possibilities
are build an index based on both coordinates (e.g. using Morton
numbers) or use a small PostGIS database which implements this kind of
index and then you can just send a SELECT query for the nearest POI.
You'll probably get better answers if you send technical questions to
the osm-dev mailing list, I don't think this discussion has much to do
with accessibility.
Cheers
More information about the Accessibility
mailing list