On 09/01/2020 14:07, François Lacombe wrote:

What would be the best solution to get information about type=site relations when loading osm data with osm2pgsql?

I'd try first to load type=site objects just like multipolygon but I don't really know how to achieve that and what would I get in the DB exactly.

The challenge I suspect with "just like multipolygons" is what sort of geometry are you expecting from them?    When I last looked near me typical usage included things like:

https://www.openstreetmap.org/relation/259892

(just a pair of bus stops)

https://www.openstreetmap.org/relation/8400580

(a collection of nodes and a way that together make up a wind farm)

https://www.openstreetmap.org/relation/5338548/history

(introduced by someone who didn't want to spend the time understanding the underlying data)

About the only thing I can think of that does try and process these is OpenInfraMap - see https://openinframap.org/#15.2/53.086391/-1.629313 for the wind farm mentioned above.

In the context of an infrastructure map it's clearly "correct" to draw a polygon around the "outside edge" of the relation components, but if you were drawing some other sort of map that might not be what you want to do at all.

What'd be interesting (to me at least) would be a solution to https://github.com/openstreetmap/osm2pgsql/issues/791 (which got closed in favour of https://github.com/openstreetmap/osm2pgsql/issues/230 , which is essentially the same issue).  It's on the site relation member where you'd want to be able to do things based on site relation membership, (e.g. "colour it blue if it's part of a wind farm") not on the site relation itself.

Best Regards,

Andy



_______________________________________________
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev

Reply via email to