organicmaps / organicmaps

🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Please donate to support the development!
https://organicmaps.app
Apache License 2.0
9.65k stars 925 forks source link

MWM features overlap to nearby regions #6532

Open pastk opened 10 months ago

pastk commented 10 months ago

E.g. complex forest and river polygons go far beyond downloaded mwm border:

shot_2023-11-10_09-22-12

Basically the same feature is duplicated in full in several MWMs if it intersects them even a bit. And if both bordering MWMs are downloaded then those duplicated features are rendered twice.

Besides optimization aspect, if we'd want to continue with #569 or #6357 it could lead to ugly rendering when a "prolonged" country feature is rendered together with a simplified World version: image

pastk commented 10 months ago

It should be possible to cut off the unwanted parts during the generation, but there could be some issues, e.g. if we cut a forest or park feature into two, then those "halfs" will have their own icons, which might look not nice. If a building is cut in half then it'll be visual also (as we draw a darker building outline) and it'll be possible to select both parts independently. Maybe a plain bbox size filter (e.g. cut only bigger features) will help to minimize those issues.

pastk commented 3 months ago

Some almost 1Mb size lakes duplicated in several mwms: https://github.com/organicmaps/organicmaps/issues/7450#issuecomment-2171580524

pastk commented 3 months ago

And another example of big areal polygons duplicated / overlapped between mwms is Dnieper river. image

pastk commented 3 months ago

A similar duplication happens with coastlines - they're divided into very big square blocks. And each mwm which touches the block even slightly has to include its full version.