Skip to content

hyphenated housenumber parsing #204

@missinglink

Description

@missinglink

We have a conservative setting for parsing hyphenated house numbers.

ie. is 4-6 a 'number range' or a 'house number and apartment number'

In some countries such as Canada their postal authority recommends separating the house number and apartment number with a hyphen.
https://en.wikipedia.org/wiki/Address#Canada

If there is an apartment number it should be written before the house number and separated by a hyphen.

As we cannot reliably determine the postal addressing format, we discard the address rather than potentially corrupting the number series with an incorrect value.

We have tests for this behaviour here: https://github.com/pelias/interpolation/blob/master/test/lib/analyze.js#L41

It would probably be better to assume these numbers are ranges and then try to detect countries where hyphens are used to delimit apartment numbers (possibly via a bbox check) and then only apply the conservative logic for these countries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions