NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

2
1

All, Looking at OSM data, I see housenumber tag being entered in multiple ways such as 12345 12A 12a,12b 12-15 etc... There are probably more formats.

I am trying to parse this data and need to know what format this data is. Is there something in the OSM data that could help me here? I suppose I could parse and test all housenumbers against all possible formats and determine what format it is in. Am I missing something that could help me to determine the format the housenumber tag is in while I read the OSM data?

Thanks.

asked 15 Jan '13, 20:39

kcjailbirds's gravatar image

kcjailbirds
141131319
accept rate: 0%


This probably depends from country to country. For instance, in Austria three official variants are used:

  • numbers (most commonly): 12
  • numbers plus letter(s) attached (letter not case sensitive): 12a
  • from - to numbers: 12-14

And housenumbers are - often, but not always - ordered and odd on the left and even on the right side of the street. Sometimes they are randomly scattered around the whole village.

And BTW: there is nothing to parse here. Use them as they are entered. And if you implement a search, be "forgivable". A search for "12" should find "12", "12a", "12-14" and "10-14".

/al

permanent link

answered 17 Jan '13, 08:30

_al's gravatar image

_al
86021018
accept rate: 4%

1

Thank you. You are correct. Instead of parsing, we need to adjust the search engine.

(17 Jan '13, 14:32) kcjailbirds
2

I even had to use non-official formats once, to get around governmental mistakes: http://osm.org/go/0EgfbRBHI--

If you look at the official data, those streets are highlighted that they have mistakes, but the mistakes can only be solved by renumbering the street (something I can't do). So until now, the housenumbers start with a letter.

(19 Jan '13, 13:42) Sanderd17
10

There are as many formats as exist in the real life + all the possible insertion mistakes. Take a look at the taginfo page for different values. There are more than 20 thousand different values that use at least 100 different formats.

You can find out from the wiki why some of these formats are used.

Depending on your needs you may concider treating housenumbers as text.

permanent link

answered 15 Jan '13, 21:41

RM87's gravatar image

RM87
3.3k23753
accept rate: 22%

Thank you for your coment. I realize that there are many many different formats of housenumber out there plus mistakes. I also found some that say something like "FIXME". I am extracting housenumber as text and storing in sql database. I was hoping there was a way to know what format they are actually in but it does not look like it.

(15 Jan '13, 21:55) kcjailbirds

"you may concider treating housenumbers as text." Actually that's probably the only option - there are too many formats to parse house numbers reliably, unless you limit yourself to a specific country or part of a country.

(05 Jan '15, 16:29) sleske
permanent link

answered 06 Jan '15, 12:02

aaronsta's gravatar image

aaronsta
25235
accept rate: 0%

edited 09 Jan '15, 05:06

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×63
×7
×4
×2

question asked: 15 Jan '13, 20:39

question was seen: 4,553 times

last updated: 09 Jan '15, 05:06

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum