[OSM-dev] Feature locator powered by main OSM database?
Nick Burch
openstreetmap at gagravarr.org
Tue May 22 11:23:08 BST 2007
On Mon, 21 May 2007, Nick Whitelegg wrote:
> I forget - did anyone ever write a feature locator powered off the main
> OSM database?
> e.g. give me all pubs within 1 mile of 50.9, -1.4.
That's pretty tricky to do with the current database schema. It gets much
easier if you split all the tags out into their own table (as we have for
way, but not for node and segment)
> The nearest thing seems to be Nick Burch's "Where am I?" but that's
> based off planet.osm, not the live database.
If we split out the node and segment tags, it'd be really quick to convert
my script to run on the 0.4 db schema. It not, it's going to be really
evil to write anything complex (since you don't know what order the two or
more tags you're looking for are in, so have to search for any possible
order)
If you just want a really simple search, then that is already implemented
in the search controller (search by tag name or value or both). For your
pub thing, you could just extend the node search to support restricting by
bounding box. It wouldn't allow you to do all the stuff that "Where am I?"
does, but it might be enough for simple stuff.
Nick
More information about the dev
mailing list