ohsome2label icon indicating copy to clipboard operation
ohsome2label copied to clipboard

Buffering lines for segmentation

Open aliFrancis opened this issue 2 years ago • 1 comments

Hi there,

Great tool!

I'm using it to make some segmentation masks for land cover analysis. I notice that a significant drawback in segmentation mode is that almost all highway=* attributes are lines, not polygons. This means that they are left blank in the segmentation labels. Is there any way around this? Otherwise the labels have large gaps where all the roads are. Given that at higher zoom levels, roads are actually extended objects several pixels wide, it would be good to be able to label these. Example below:

14 8584 5593

Thanks!

aliFrancis avatar Sep 06 '22 10:09 aliFrancis

Hi @aliFrancis,

Thanks for reaching out!

Unfortunately, the current segmentation model deals only OSM polygon features. Actually, we had also though about the scenario you mentioned above, while still it is not possible to decide a proper pixel buffer for all polyline features in OSM, for instance, roads and water streams might have different widths.

I marked this as a wanted enrichment feature, while not sure to which extent this feature can be integrated into existing main branch, given the buffer of road might still be a very specific case and need potential user input of their desired buffer size?

Another workaround is to do preprocessing (polyline buffering into polygon) separately before you run ohsome2label label ..., while this might be just a hot fix.

Best Regards,

Hao

bobleegogogo avatar Sep 11 '22 19:09 bobleegogogo