osmandapp / OsmAnd-iOS

OsmAnd for iOS
Other
288 stars 92 forks source link

A lot of forests are missing from the map #4055

Open pronvit opened 1 month ago

pronvit commented 1 month ago

Most of the state forests in QLD, Australia (and probably in other places?) are missing from the map in OsmAnd. See the screenshots from OSM web map and OsmAnd (never mind a slightly different UI on iOS, this is my personal build). This happens with any map style and details settings. I tried debugging and looks like they're not in a list of objects for a tile at all but I'm not too familiar with osmand core code. On the other hand, if you try searching for say Benarkin State Forest, it will be found (and you'll be taken to an invisible object on the map), so it seems to be present in the map data.

Screenshot 2024-10-13 at 9 42 56 am

Screenshot 2024-10-13 at 9 59 49 am

vshcherb commented 1 month ago

https://www.openstreetmap.org/relation/8681576#map=11/-26.8225/152.1885

vshcherb commented 1 month ago

OsmAnd doesn't display type=boundary and only type=multipolygon, so even though default rendering is using it I think it's a mapping issue. If it's that area actually is the forest, then it shouldn't be mapped as boundary

pronvit commented 1 month ago

Yeah, the type did seem strange to me. Is there a quick and dirty solution for me given I'm using a custom build already anyway? There's a ton of objects like this around here, quite possibly they all are a result of an incorrect import or smth, but on the other hand looks like it's only OsmAnd that doesn't render them.

vshcherb commented 1 month ago

Yes, but we need to contact community and understand what's the reasoning and probably update wiki page for type=boundary, otherwise we keep copying "error mapping" which gives a bad service for OpenStreetMap itself as there are many other rendering styles and so on.

So it's not that difficult to implement on our side for forests but for all type=boundary it's definetely a mistake, so we need to clarifying mapping intention first

pronvit commented 1 month ago

Sure I get that, but I meant could you point me in the right direction how to fix this locally for myself? I can't seem to get these objects to show no matter how I tweak the style (while I expected to be able to render them at least like the similar nat parks boundaries), do they get filtered out somewhere in the code or even during map creation?

While this object for example https://www.openstreetmap.org/relation/1506597#map=11/-26.3949/152.3481 also has type=boundary but is rendered with any map style no problem.

Screenshot 2024-10-14 at 1 11 53 pm
vshcherb commented 1 month ago

It's hard coded, for protected_area there was an exception cause we wanted to render as transparent shader so from line it converted to polygon

pronvit commented 1 month ago

Alright, I still couldn't find where protected_area gets a special treatment, but I added type conversion for forests to rendering_types.xml, recreated the map form osm, and that did the trick.

vshcherb commented 1 month ago

https://github.com/search?q=repo%3Aosmandapp%2FOsmAnd%20protected_area&type=code