Вопрос

I want to build a website with a map based on openstreetmap that colors buildings based on a their potential average annual yield of solar power. I have the energy data for individual houses.

My question is now, can I assign each house (identified by street name and number) a value and the house can then be colored based on this value in the browser?

I have little to no experience with openstreetmap and would be happy about hints into the right direction.

Это было полезно?

Решение

So you need a OSM dataset and filter it for building=* ways to get the building outlines (e.g. with osmosis). Then you do create a second run to filter for addr:= tags of nodes and merge them with the building outlines from step 1. Be aware of conflicts and that one building can have multiple addresses. So now you have a dataset with normalized addresses and need to create a lookup structure like hashmap to get a mapping for your solar data: addr:street x addr:housenumber -> building id
(very raw idea on how to do it)

IMHO the mixing of external datasources to the copyleft open database license makes that you need to relicense your dataset also under ODbL.
Also keep in mind that not every address is currently at OSM and the existing ones can be wrong!

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top