You are not logged in.

#1 2020-07-26 18:27:29

New Member
Registered: 2020-07-26
Posts: 1

Building geometry from address

Is there any reliable way to get a building's geometry from an address? I tried using Nominatim to geocode the address:

import { NominatimJS, ISearchParams } from 'nominatim-js'

const search: ISearchParams = {
    q: '415 Mission St, San Francisco, CA 94105',
    country: 'USA',
    accept_language: 'en'
let results = await;

(or … 1&viewbox=)

Which works on very well known buildings like Salesforce Tower, in that the response from Nominatim includes

"osm_id":431972186, which has the nodes I can use to form the building geometry.

However, doing the same for … 1&viewbox= gets the proper geocode, but it returns a company rather than the building... and I don't see any obvious way to jump from one to the other.

Similarly, an address often returns a segment of street, such as … 1&viewbox=. I can do a radius search for buildings on Overpass:

// adjust the search radius (in meters) here
// gather results
  // query part for: “building=*”
  way["building"](around:{{radius}},{{geocodeCoords:401 S Hope St, Los Angeles, CA 90071}});
// print results
out body;
out skel qt;

but that results in like 6 buildings. Picking a radius is really just a guessing game, as sometimes buildings are right at the street, and sometimes they can be hundreds of meters away from the street.

Further, looking at the actual building that should be at 401 S Hope St:, I don't see anything that would actually link it to that address. Going in to edit the data for that building ( … -118.25472), I can see that there is actually no address.

(I avoided contributing an address at the moment so that the links in the post stay as I found them, but I will go back in a week and contribute to those records.)

So, am I doing something wrong on my approach, or are there just a bunch of building geometries that don't have addresses attached to them?


Board footer

Powered by FluxBB