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.49k stars 912 forks source link

Split Tanzania to smaller regions #4548

Open biodranik opened 1 year ago

biodranik commented 1 year ago

Tanzania now takes 500+Mb and is hard to download on a slow internet in Africa. Splitting it will help a lot of local users. A user suggested splitting it into the following regions:

  1. Coastal region: Pwani, Morogoro, Tanga regions
  2. Central Tanzania: Dodoma, Singida, Tabora, Shinyanga regions
  3. Kilimanjaro: Arusha, Kilimanjaro, Manyara regions
  4. Lake Victoria: Mara, Simiyu, Mwanza, Geita, Kagera regions
  5. Lake Tanganyika: Kigoma, Katavi, Rukwa regions
  6. Southern Highlands: Mbeya, Songwe, Njombe, Iringa regions
  7. Southern Tanzania: Songea, Lindi, Mtwara regions

To do the splitting, .poly file with region borders should be prepared (like in data/borders folder), and refactoring mentioned in #2283 is needed.

Important note: polygons/borders should not be too big and detailed and should reuse the same geometry (edges) to avoid "holes" between neighboring regions.

HinzundKunz commented 1 year ago

I got the regional borders of Tanzania in shx format from the website of the National bureau of Statistics and will try to convert the shape files to something that can be edited in JOSM to create .poly files. Don't know how it will go, as I'm not really proficient in it, but we'll see... ;-)

HinzundKunz commented 1 year ago

Oh, and would it be better to just do every region by itself, or grouping them together like listed above? Doing every region by itself would be 31 .poly files (or 27 if I group all the islands together).

biodranik commented 1 year ago
  1. It would be great to avoid creating too many regions. 7-15 sounds ok, while more of them may create some overhead.
  2. Regions should share borders (use the same polylines!) with other neighboring countries in Organic Maps to avoid "holes".
  3. You may try to export existing region borders from OSM.org directly.
biodranik commented 1 year ago

OSMers recommend using JOSM with a poly plugin to edit poly files. You may take the existing Tanzania poly from Organic Maps, and split it manually by reusing its original borders, by roughly drawing lines on top of existing OSM regional borders.

See also https://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format

Emilevillette commented 1 year ago

Hi, based on your initial comment, I gave JOSM a try, and came up with the following map:

image

Also perhaps it would be relevant to have a region for pemba and zanzibar.

I'd love to hear your thoughts on this.

I found the border data on https://osm-boundaries.com

biodranik commented 1 year ago

What are these "island"-like regions ("holes")? Ideally there should be no smaller regions that are completely inside some bigger regions.

Emilevillette commented 1 year ago

These are lakes. To deal with these, I had in mind to integrate them to the regions according to the official borders.

image

HinzundKunz commented 1 year ago

Wow, great work! My thoughts: integrate the islands into the coastal region, or make them separate. Both is fine. And integrating the lakes into the regions looks good to me as well (if you mean that you would just draw the border through the lakes and then delete them from the poly file).

Emilevillette commented 1 year ago

Thanks :) Yes that was my idea. I'll get to it later this week.

biodranik commented 4 weeks ago

Borders for OM should be as simple as possible, with the lowest amount of points in them to work faster on clients, while covering the necessary territory, and sharing the same edges with neighboring regions/countries. Any OSM feature partially inside a border is fully stored in the mwm.

Borders on lakes (which act as natural borders between regions) can be very simple: a line that goes through the lake. There is no need to carefully draw each detail. Only what's inside a border is important/used for the mwm generation.

CC @newsch