prochitecture / blosm

GNU General Public License v3.0
11 stars 3 forks source link

[streets] Multipolygonal objects #38

Open vvoovv opened 2 years ago

vvoovv commented 2 years ago

Forests and other objects may be mapped as relations in OSM.

A relation can be used to map any combination of

The problem is that a hole (or an inner ring) is not explicitly assigned to any outer ring. The inner ring is only marked as such.

vvoovv commented 2 years ago

Can we triangulate those objects and then employ them in the existing processing pipeline?

vvoovv commented 2 years ago

I hope PyGEOS can be used to find out: 1) If an outer ring has any inner rings 2) To which outer ring does an inner ring belong

If an outer ring doesn't have any inner rings, it can be considered as a simple polygon.

polarkernel commented 2 years ago

I assume that those relations are of type=multipolygon and that the member objects are closed polygons (or borders that have already been combined to closed polygons). I assume further that the members are marked either as role="outer" for the objects that cover an area or role="inner" for holes.

If this is the case, then the easiest way to integrate them into the processing pipeline would be to provide them by an additional manager, not by manager.polylines or to mark them as relation there an provide a list of polygons with their roles. They do not fit to the complicated process of checking and repairing polyline objects and have to be processed separately. Subtracting holes from the outer polygons by pyGEOS, where required, is possible and it is possible to integrate the resulting object polygons with holes into the pipeline behind the repair process.

I hope PyGEOS can be used to find out:

  1. If an outer ring has any inner rings
  2. To which outer ring does an inner ring belong

1.: Not directly. All candidates have to be subtracted 2.: Similar

vvoovv commented 2 years ago

You know OSM data model quite well. I could have used the terms from the OSM data models instead of outer and inner rings.

1.: Not directly. All candidates have to be subtracted

Yes, I implied that.

polarkernel commented 2 years ago

You know OSM data model quite well.

Google is my friend! ;-)