[OSM-talk] Properly tagging is_in of roads
David Earl
david at frankieandshadow.com
Wed Dec 3 09:51:16 GMT 2008
On 02/12/2008 16:10, Andy Allan wrote:
> On Tue, Dec 2, 2008 at 2:07 PM, Olav Einervoll <olav at einervoll.com> wrote:
>> Hi
>>
>> To get proper searching of roads and stuff is this the correct way to do it?
>>
>> For the village:
>> name: John's Village
>> place: village
>> is_in: Municipality, County, Country
>>
>> and then for every road example:
>> highway: secondary
>> name: John's road
>> is_in: John's Village
>
> Aaargh, that's a very complicated and error prone way to do it. I
> certainly wouldn't advise you to tag every road with is_in. Instead,
> it's a much better idea to make an area to represent the village, and
> other programs can use that to work out which road is in the village
> using spatial maths.
I think Olav's point wasn't "I plan to write an algorithm" but merely
"what makes my street name show up when I do a search on
www.openstreetmap.org".
Olav - you *don't* need to put is_in on ways representing streets. The
search works by looking for named items (not just streets) which are
close to the place you ask for. But it *does* help if you put is_in on
places.
At present to search within a place needs a comma in the search, as in
"John's Road, John's Village"
If there are two John's Villages in the world, you can limit the one you
mean with a third term, "John's Road, John's Village, County" in which
case the third term is looked for in the is_in or the place.
As I say, at present the comma is necessary and you can't give both
country and county, and other limitations. However, I'm working on
making this much more free format. That will work with no change needed
to the data, but searches will more likely find the result if is_in on
places is used.
David
More information about the talk
mailing list