[OSM-dev] nominatim-like wildcard search
Roland Olbricht
roland.olbricht at gmx.de
Wed Aug 29 12:55:37 BST 2012
> For exempel "Bre*" would return "Bremen", "Brenner" etc. I will limit my
> queries by bbox,
You can use Overpass API:
E.g.
http://overpass-api.de/api/interpreter?data=(rel[name~"^Bre"](50.6,7.0,50.8,7.3);way[name~"^Bre"](50.6,7.0,50.8,7.3);node[name~"^Bre"](50.6,7.0,50.8,7.3););out;
gives all elements that have a name tag starting with "Bre".
The result is not sorted, but this should be no problem on the client side, given that these queries don't produce too much data.
The bounding box order is (south,west,north,east). The term "^Bre" is the regular expression matching all strings beginning with "Bre".
Of course, you can also search without a bounding box, but in that case you should give further restrictions:
http://overpass-api.de/api/interpreter?data=(rel[name~"^Bre"][place=city];way[name~"^Bre"][place=city];node[name~"^Bre"][place=city];);out;
If you are interested, feel free to ask for more details.
Cheers,
Roland
More information about the dev
mailing list