Is there a way to find the geo coordinates of all the buildings in a city?

604 views Asked by At

I am working with the Uber H3 library. Using the poly fill function, I have populated an area with H3 indexes for a specific resolution. But I don’t need all the indexes. I want to identify and remove those indexes which are getting plotted on isolated areas like jungles, lakes, ponds, etc. Any thoughts on how that can be achieved? I thought that if I can map all the buildings in a city in their respective indexes, I can easily identify those indexes in which no buildings are mapped. I’d maintain a Hashmap of h3 index as the key and a list of coordinates which lie in that index as the value.

1

There are 1 answers

0
nrabinowitz On

In order to address this, you'll need some other dataset(s). Where to find this data depends largely on the city you're looking at, but a simple Google search for footprint data should provide some options.

Once you have footprint data, there are several options depending on the resolution of the grid that you're using and your performance requirements.

  • You could polyfill each footprint and keep the resulting hexagons
  • For coarser data, just using geoToH3 to get the hexagon for each vertex in each building polygon would be faster
  • If the footprints are significantly smaller than your hex size, you could probably just take a single coordinate from each building.

Once you have the hexagons for each building, you can simply do a set intersection with your polygon hexes and your building hexes to get the "good" set. But it may be easier in many cases to remove bad hexagons rather than including good ones - in this case you'd need a dataset of non-building features, e.g. water and park features, and do the reverse: polyfill the undesired features, and subtract these hexagons from your set.