How to set addresses for multiple apartments in the same building?

I have been trying to add an apartment complex in a way that allows users to search for individual apartment addresses and have the correct building within the complex returned as a result. My first thought was to set a range for the Unit number in the address field, but when I set the “addr:unit” key to “100-108” searches for apartments 100 through 108 return no results.
From I thought I should use the “addr:flats” key, but again, setting “addr:flats=100-108” returns no results when searching for any apartment in that range.
I have also seen it suggested to add nodes for each apartment and set the address of each node to be the address of a single unit. While this would work for my current case, it would not be feasible for a single apartment building with hundreds of units, for which specifying a range would be extremely convenient. Is there a way to set apartment addresses by specifying a range of unit numbers in a way that will show up in search results?

You could use address interpolation

In the Netherlands, we import it from open data. In apartment buildings, like mine, this will result in a single node per address. If you want to micro map, you can even indicate which level/floor a certain number can be found. I can imagine that entering that many nodes is time consuming.
I’m currently checking out the JOSM plugin ‘AddrInterpolationDialog’ which might just do it for you. I’ll get back in a minute.

Edit: This plugin does the job. See this wiki. It makes a interpolated address way for you, but if you check ‘convert way to individual house numbers’, you’ll get all the numbers. Enter ‘start #’, ‘end #’, ‘numbering scheme’ (even, odd, all, with steps of x), some street/city/postal code information and done.

I am not convinced current interpolation techniques cover what Jt0 is looking for. I think addr:interpolation only deals with house numbers not with apartment numbers.

Maybe you need to give a more concrete example, Jt0, but I understand that you have a situation like this:

A Street:
1st building: apartments 1-20
2nd building: apartment 21-40
3rd building: apartment 41-60

B Street:
4th building: apartments 1-15
5th building: apartments 16-30

Now you would like to be able to search for B Street apartment# 12 and be directed to the 4th building. Is that correct? No classical house numbers involved (do they exist additionally?).

I have no clue how to do that without mapping each individual apartment or relying on some search application to eventually cater for searching within a range.

Yes, I’d like to interpolate just the unit numbers. The situation is exactly like your example, except that all apartments share the same street address. They are arranged in multiple buildings as follows:

Building 1: units 100-108
Building 2: units 200-208
Building 3: units 300-306
Building 4: units 400-408
And so on. Not all buildings have the same number of units, but this should be handled by interpolation (should, but isn’t).

What I would like to do is use “addr:unit=100-108” and have any search within that range (575 Shelton Mill Rd Apt 101, for example) to return building 1 within the complex. Otherwise, I think interpolation lines should handle unit interpolation exactly the same way they handle house number interpolation. Currently, they do not recognize unit numbers applied to their end nodes. As a result, the only way to return results for a search for a specific apartment is to add a node for each apartment and address each node individually.

Actually, where I live is at the end of cul de sac, and the flats are numbered as continuations of the the street addresses, including on PAF. Another case to consider.

Many years ago I lived on a large housing estate in Scotland where there were hundreds of residences like that. Terraces, for the most part. Each unit in the terrace had a common stairwell with two residences downstairs and two residences upstairs. The residences were numbered sequentially, as houses would be. They weren’t flats or units but pseudo-houses. You’d have an address like 11 Furby Grove, not Flat 11 or Unit 11 Furby Grove.

There are a few units (far smaller) a couple of streets away from where I am now, in Wales.

I suspect the numbering scheme used depends on whether the building was divided as-built or after-the-fact. After-the-fact and all you can do is call them flats, or go with 11A, 11B, or 11.1, 11.2, 11.3. But if you’re designing it that way from the start you might as well number the residences sequentially.

IMO this is exactly how it should work and what you’ve spotted is a weakness in the search functionality. My recommendation would be to continue tagging correctly (IMO addr:flats is better suited for this situation since it explicitly permits ranges and multiple values) and have faith that the search algorithms with catch up.

The search box is powered by a project called Nominatim. You could report an issue on Nominatim’s Github page, but it looks like there’s already a relevant discussion in issue 587.