Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to navigate between two custom .mwm #12232

Open
dew54 opened this issue Dec 5, 2019 · 6 comments
Open

Unable to navigate between two custom .mwm #12232

dew54 opened this issue Dec 5, 2019 · 6 comments

Comments

@dew54
Copy link

dew54 commented Dec 5, 2019

Hi everyone,
I created custom .poly files in order to generate my custom region .mwm files.
I edited countries.txt file, adding the names of those regions, generated the packed_polygons.bin file, and i'm able to route inside one of them, but when i try to calculate a route between two different custom regions MAPS.ME app says that is impossible.

Is there a way to tell to MAPS.ME that regions i've created are joined together?
I'm suspecting that this is the problem.. or maybe i'm missing something in countries.txt file?
Thank you in advance,
Davide

@tatiana-yan
Copy link
Contributor

Hello.

cd to omim/tools/python, run

python3 -m mwm dump_mwm --path <path to mwm>

for both mwms and attach results here please.

@dew54
Copy link
Author

dew54 commented Dec 5, 2019

Hi Tatiana! thanks for your quick reply!
Here they are:
For the first:

Tags: version : offs 8 len 10 header : offs 24 len 32 rgninfo : offs 56 len 4 dat : offs 64 len 66 geom0 : offs 136 len 0 geom1 : offs 136 len 0 geom2 : offs 136 len 0 geom3 : offs 136 len 0 meta : offs 136 len 0 metaidx : offs 136 len 0 offs : offs 136 len 156 trg0 : offs 136 len 0 trg1 : offs 136 len 0 trg2 : offs 136 len 0 trg3 : offs 136 len 0 metalines: offs 296 len 2 idx : offs 304 len 357 sdx : offs 664 len 1 addr : offs 672 len 208 ranks : offs 880 len 424 centers : offs 1304 len 329 speedcams: offs 1640 len 8 routing : offs 1648 len 373 roadaccess: offs 2024 len 36 cross_mwm: offs 2064 len 31 traffic : offs 2096 len 2 transit_cross_mwm: offs 2104 len 31 Format: 9, version: 2019-12-05 14:38 Header: {'basePoint': (13.798392368841121, 45.80320455657406), 'bounds': (13.8011067643844, 45.80130851163439, 13.828835441386957, 45.81193413209139), 'scales': [10, 12, 14, 17], 'langs': [], 'mapType': 'country'} Region Info: {'languages': ['it']} Metadata count: 0 Feature count: 8 Sample features: {"id": 0, "size": 6, "header": {"types": ["power-tower"]}, "geometry": {"type": "Point", "coordinates": [13.818597449500828, 45.80522207199253]}} {"id": 8, "size": 7, "header": {"types": ["power-tower"]}, "geometry": {"type": "Point", "coordinates": [13.825139357336894, 45.80270156869208]}} {"id": 2, "size": 6, "header": {"types": ["power-tower"]}, "geometry": {"type": "Point", "coordinates": [13.803990139096896, 45.81085165676825]}} {"id": 3, "size": 6, "header": {"types": ["power-tower"]}, "geometry": {"type": "Point", "coordinates": [13.8011067643844, 45.81193413209139]}} {"id": 4, "size": 6, "header": {"types": ["power-tower"]}, "geometry": {"type": "Point", "coordinates": [13.81483431022491, 45.80664681643403]}}

For the second:

Tags: version : offs 8 len 10 header : offs 24 len 32 rgninfo : offs 56 len 4 dat : offs 64 len 481317 geom0 : offs 481384 len 444 trg0 : offs 481832 len 2017 geom1 : offs 483856 len 2020 trg1 : offs 485880 len 19302 geom2 : offs 505184 len 10853 trg2 : offs 516040 len 115045 geom3 : offs 631088 len 45164 trg3 : offs 676256 len 525442 metaidx : offs 1201704 len 150984 meta : offs 1352688 len 130753 offs : offs 1483448 len 26120 postcodes: offs 1509568 len 16017 metalines: offs 1525592 len 1699 idx : offs 1527296 len 65735 sdx : offs 1593032 len 116676 addr : offs 1709712 len 17307 ranks : offs 1727024 len 6072 centers : offs 1733096 len 83372 speedcams: offs 1816472 len 8 routing : offs 1816480 len 10253 restrictions: offs 1826736 len 51 roadaccess: offs 1826792 len 492 city_roads: offs 1827288 len 1424 maxspeeds: offs 1828712 len 1016 cross_mwm: offs 1829728 len 9686 traffic : offs 1839416 len 2577 transit_cross_mwm: offs 1842000 len 31 Format: 9, version: 2019-12-05 14:38 Header: {'basePoint': (13.624807846731017, 45.89892691870141), 'bounds': (13.526561211992515, 45.76599551158524, 13.805529727082927, 46.05534524566139), 'scales': [10, 12, 14, 17], 'langs': [], 'mapType': 'country'} Region Info: {'languages': ['it']} Metadata count: 18873 Feature count: 28919 Sample features: {"id": 7692, "size": 17, "header": {"types": ["amenity-parking-private"]}, "geometry": {"type": "Polygon"}} {"id": 21230, "size": 9, "header": {"types": ["building-address"], "house": "31"}, "geometry": {"type": "Point"}} {"id": 23560, "size": 9, "header": {"types": ["building-address"], "house": "13"}, "geometry": {"type": "Point"}} {"id": 21992, "size": 6, "header": {"types": ["building"]}, "geometry": {"type": "Polygon"}} {"id": 26717, "size": 13, "header": {"types": ["building"]}, "geometry": {"type": "Polygon"}}

@tatiana-yan
Copy link
Contributor

tatiana-yan commented Dec 5, 2019

I see that first mwm is extremely small and it looks like it has no roads (only points because geometry sections which store lines and areas are empty).

@dew54
Copy link
Author

dew54 commented Dec 5, 2019

Ok, so this is the situation:
I splitted the Italy in a grid of .poly files, like this:

Italy_456134
1
        13.400000 45.400000
        13.400000 45.600000
        13.600000 45.600000
        13.600000 45.400000
        13.400000 45.400000
END
END

Then i deleted everything from /omim/data/borders and added my .poly files. (4 files)
Poly files are:

Italy_456134
Italy_456136
Italy_458134
Italy_458136

I edited the countries.txt deleting everything and adding those lines:

{
    "v":190910,
    "id": "Countries",
    "g": [
          {
        "id": "Italy",
        "g": [
           {
           "id": "Italy_456134",
           "old": [
              "Italy"
           ],
           "affiliations": [
              "Italia"
           ],
           "s": 176713 ,
           "sha1_base64": "1bafa21f790a08f11b7ed62a1a7324e53c3e5cf7"
           },
           {
           "id": "Italy_456136",
           "old": [
              "Italy"
           ],
           "affiliations": [
              "Italia"
           ],
           "s": 176713 ,
           "sha1_base64": "1bafa21f790a08f11b7ed62a1a7324e53c3e5cf7"
           },
           {
           "id": "Italy_458134",
           "old": [
              "Italy"
           ],
           "affiliations": [
              "Italia"
           ],
           "s": 176713 ,
           "sha1_base64": "1bafa21f790a08f11b7ed62a1a7324e53c3e5cf7"
           },
           {
           "id": "Italy_458136",
           "old": [
              "Italy"
           ],
           "affiliations": [
              "Italia"
           ],
           "s": 176713 ,
           "sha1_base64": "1bafa21f790a08f11b7ed62a1a7324e53c3e5cf7"
           }
        ]
        }
    ]
}

I know that sha_base64 and s parameters are not relevant if i import manually the .mwm maps so i leaved all the same.

Note: those are only 4 areas, just for testing.

Then i regenerated the packaged_polygons.bin file and sobstituted the original one.

Then i added the 4 areas' names to file_generation_order.txt

Everything seems to be good but when i try to trace a route, MAPS.ME gives a ROUTE INTERNAL ERROR

@tatiana-yan
Copy link
Contributor

tatiana-yan commented Dec 5, 2019

Looks like problem with this map (first dump) is that it has no roads. Do you see any roads in it when you open only one(this) mwm? should it have roads?
Problem may be like this: osm way goes through this small mwm but does not have any point inside. I think it can break cross-mwm routing.

@dew54
Copy link
Author

dew54 commented Dec 6, 2019

I've opened a new issue, please help me @tatiana-yan

#12239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants