Skip to main content

How can a building have two addresses?

A single physical building can have multiple valid addresses. For commercial buildings, multifamily housing, corner properties, and any structure that touches more than one administrative system, that is the normal stateregionThe first-level administrative subdivision of a country — a US state, a French region, a province. The component between country and locality. of affairs. A parser that assumes "one building = one address" will fail silently on a large fraction of real-world queries.

The address is a protocol, not a property

An address is a social protocol for directing a courier, not a geographic fact — different couriers use different protocols, and the same building can participate in several at once.

Mailing address vs. 911 address

SystemAddress for 350 Fifth Avenue, Manhattan
USPS mailing350 5th Ave, New York, NY 10118
911 emergency dispatch350 5th Ave, Manhattan, NY 10001

The ZIP codes differ (10118 vs 10001) because USPS assigns delivery-specific ZIP+4 codes for high-volume buildings and 911 uses the geographic ZIP. Both are correct. Both describe the same building. A geocoder that resolves to the USPS ZIP will produce a different centroid than one that resolves to the 911 ZIP. The difference is small for the Empire State Building (both are in Midtown Manhattan) but can be miles apart for rural addresses where the mailing ZIP covers a much larger area than the 911 response zone.

Street address vs. utility billing

SystemAddress
USPS350 5th Ave, New York, NY 10118
Con Edison (electric utility)350 5th Ave, New York, NY 10001-0001
Building managementEmpire State Building, 350 Fifth Avenue

The utility company uses its own ZIP+4 extension (the -0001 suffix). The building management uses the building's brand name as the primary identifier. A delivery driver looking for "350 5th Ave" will find the building. A tourist looking for "Empire State Building" will also find it. But a geocoder that only indexes the USPS form will not match the tourist's query, even though the building is in its database under a different labelcomponent tagOne of the 33 labels in Mailwoman's address schema — street, locality, region, postcode, house_number, unit, po_box, country, venue, intersection, and others. Each parsed span carries exactly one component tag..

Corner buildings

A building at the corner of two named streetsstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. has two valid streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. addresses:

123 Main St entrance → 123 Main St
(same building)
456 Elm St entrance → 456 Elm St

The building occupies both streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. frontages. The main entrance determines the postal address, but the secondary entrance is a valid location reference. Emergency services need both — a 911 caller entering from the Elm Street side will report "456 Elm St," and the dispatcher must recognize that this is the same building as "123 Main St."

Multifamily buildings

123 Main Street has 20 apartments. Each apartment has a distinct mailing address:

123 Main St, Apt 1A
123 Main St, Apt 1B
...
123 Main St, Apt 5D

The building has one streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. address and 20 unitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. addresses. A geocoder that resolves "123 Main St" to the building rooftoprooftopGeocoding precision at the building or parcel level — coordinates within a few metres — the highest tier of the geocode cascade. Sourced from address-point and situs data. is correct for the building but wrong for any specific apartment — the rooftoprooftopGeocoding precision at the building or parcel level — coordinates within a few metres — the highest tier of the geocode cascade. Sourced from address-point and situs data. may be 100 feet from the actual apartment entrance. A delivery to "Apt 5D" needs the building entrance plus internal navigation (floor 5, door D). A geocoder cannot provide the internal navigation, but it should recognize that "123 Main St" without a unitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. is an incomplete address and flag it as such.

Administrative overlap

350 5th Ave
New York, NY 10118 (USPS mailing city: "New York")
Manhattan, NY 10001 (borough-level: "Manhattan")
New York County, NY (county-level)

All four administrative labelscomponent tagOne of the 33 labels in Mailwoman's address schema — street, locality, region, postcode, house_number, unit, po_box, country, venue, intersection, and others. Each parsed span carries exactly one component tag. refer to the same location at different levels of the hierarchy. A parser that expects exactly one locality per address will produce different results depending on which labelcomponent tagOne of the 33 labels in Mailwoman's address schema — street, locality, region, postcode, house_number, unit, po_box, country, venue, intersection, and others. Each parsed span carries exactly one component tag. the input uses. "New York" and "Manhattan" are different strings that describe the same place — the resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. must treat them as equivalent without losing the distinction in the output.

Buildings that straddle borders

Some buildings literally cross administrative boundaries:

  • StateregionThe first-level administrative subdivision of a country — a US state, a French region, a province. The component between country and locality. line buildings: A building with one entrance in Kansas and another in Missouri. Different stateregionThe first-level administrative subdivision of a country — a US state, a French region, a province. The component between country and locality. tax rates, different ZIP codes, same physical structure.
  • Municipal boundary: A building in an annexed area whose mailing address still reflects the pre-annexation municipalitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighbourhood in the hierarchy.. USPS has not updated the delivery name, but the legal municipalitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighbourhood in the hierarchy. has changed.
  • PostcodepostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one. boundary: A building whose unitsunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. on different floors map to different postal codes because the postcodepostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one. boundary follows the building's vertical axis (rare but real in dense urban cores).

In each case, the "correct" address depends on who is asking and why. The tax assessor wants the legal municipalitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighbourhood in the hierarchy.. The postal carrier wants the USPS delivery citylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighbourhood in the hierarchy.. The emergency dispatcher wants the 911 response zone. A geocoder that picks one and calls it "the address" is making an administrative choice the user did not ask for.

What this means for a parser

The parser should not resolve ambiguity between address forms. It should surface it.

When the input is Empire State Building, NYC, the parser should emit:

venue: Empire State Building
locality: New York City

And let the resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. return candidates for "Empire State Building" in New York City — which will include the 350 5th Ave location with high confidence. The parser does not need to know that "Empire State Building" and "350 5th Ave" are the same place. The resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. knows that because WOFWOF (Who's On First). An open-source gazetteer of places maintained by Mapzen/whosonfirst. Mailwoman builds a custom SQLite database from WOF GeoJSON repos, extended with postcode data, importance scores, and coincident-role relations. stores both as names for the same wof:id.

When the input is 350 5th Ave, New York, NY 10118 and the resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. returns the WOFWOF (Who's On First). An open-source gazetteer of places maintained by Mapzen/whosonfirst. Mailwoman builds a custom SQLite database from WOF GeoJSON repos, extended with postcode data, importance scores, and coincident-role relations. record for the Empire State Building, the output should include the WOFWOF (Who's On First). An open-source gazetteer of places maintained by Mapzen/whosonfirst. Mailwoman builds a custom SQLite database from WOF GeoJSON repos, extended with postcode data, importance scores, and coincident-role relations. ID and coordinates, but also preserve the raw parsed address. The user might need the mailing address form, not the building name.

When the input is 123 Main St and the resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. finds a multifamily building with 20 unitsunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise., the output should flag the ambiguity: "This address is a multi-unitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. building. Specify an apartment number to resolve to a specific unitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise.." The parser cannot guess which unitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. the user meant, but it can tell the user that the query is underspecified.

The schema consequence

Mailwoman's schema includes unit as a first-class component because multi-unitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. addressing is too common to treat as an edge case:

components: {
house_number: "123",
street: "Main St",
unit: "Apt 4B",
locality: "Springfield",
region: "IL",
postcode: "62701"
}

The unit tag is optional — many addresses do not have unitsunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise.. But its presence in the schema means the parser can recognize and extract unitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. information when it exists, and flag its absence when the building is known to be multi-unitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. (from the resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon.'s building metadata).

See also

  • What is a postcode? — why mailing postcodespostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one. and geographic postcodespostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one. diverge
  • The database fallacy — why no database captures all address forms for a building
  • How humans break addresses — the postal citypostal cityThe city name the postal service uses for a ZIP, which can differ from the legal municipality a resident lives in — e.g. many suburbs share a larger city's postal name. A source of locality ambiguity. ≠ municipal citylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighbourhood in the hierarchy. failure mode
  • Resolver and Who's On First — how the gazetteergazetteerA geographical index that maps place names and postcodes to real-world coordinates. Mailwoman uses a custom-built Who's On First (WOF) SQLite database as its gazetteer — the 'atlas' half of the grammar/atlas architecture. stores alternate names