Jorisbo / Mkgmap-Mapnik-Style-Garmin

Custom mkgmap style and typ-file for rendering routable Garmin Maps in the Openstreetmap Mapnik layout
17 stars 3 forks source link

Routing issues #2

Open Joaoha opened 4 years ago

Joaoha commented 4 years ago

Hi Jorisbo,

You have a great style here, congratulations and thank you for putting time into this. I've been "hacking" you style and typ to adapt to my preference, and in the process I found a few issues. Some I managed to resolve others I'm afraid my knowledge is not good enough.

One issue had to do with routing. I found that routing was not working for long distances after I compiled a map, do you have the same issue? Another one was with address searches, I found that unless I copied the contents of inc/places into the points file and changes some of the heading address searches would not work.

Let me know, and if you like I'm happy to post the files I edited for you to have a look. (they are probably horrible and a very ugly hack on top of your great work, but it works for now.

Thanks

Jorisbo commented 4 years ago

Hello Joaoha !

Thank you for the compliment and nice to here from you. I must admit that i don't use routing myself very much so it is possible that this gives problems. But.... i also know that garmin and routing is not very strong and it helps a lot if you use 'via-point's ' to cut the route in pieces. So a couple of waypoints in between and then route A via B to C to reach D. And yes i'm interested in improvements as long as the visual reprensentation of the map gets as near as possible to the openstreetmap.org website representation. What i don't understand from your post if you get housnumber search working?

Kind regards, Joris

Joaoha commented 4 years ago

Yes I managed to get housenumber search. And I do understand the routing best practices, however some times i could not even route distances longer than 50Km which for me is important because I'm and Adventure Motorcycle rider, and I build 5000Km+ routes, so having to build waypoints every 50km is not practical. I did change some graphics from the typ file but not the references in the style so it should be ok to just use your typ to keep the visual representation you designed. Let me know if you want me to get these edited files to you. I just have to apologize for the ugly hacks :-)

Joao

Jorisbo commented 4 years ago

Hi Joao,

Could you sent me your files? I'll have a look.

kind regards, Joris

Joaoha commented 4 years ago

Here you go: https://drive.google.com/open?id=1WtQYKft0XAh2WeFJfrhuKm9XBi9-yXVj

Jorisbo commented 4 years ago

Hi Joaoha, i looked at your issues and created an updated for the search problem. The problem was not solved by replacing the inc/place file. Streets in cities bigger then 250.000 citizens were excluded because these city-names were not visible at the highest zoomlevel 24. Took me a while to figure that out. I also merged some 'basic' files from the mkgmap-default style back into mine in the hope for solving strange routing issues. For now i'm able to route 300km between 2 countries form Köln to Amsterdam with 3 via-points . Even on a native garmin basemap it is not possible to calculate the full 300km in one go so i think 75km is about the maximum. Maybe it also works for you. Attached the new style-zip i'll update github after more testing Style - Jbm 20200416.zip image

Kind regards Jorisbo at hotmail.com

Joaoha commented 4 years ago

Hi Jorisbo,

I've tested your new style and addresses are working. Routing as you say still not "ideal", I don't knwo about the limitation you are talking about the basemap, I can route 600+Km with the changes, i made, and garmin.openstreetmap maps can also route 600+km: Annotation 2020-04-17 225035

This is using the same map build options but with the style version you just shared: Annotation 2020-04-17 224928

Jorisbo commented 4 years ago

Hi Joao,

I tested with the same New Zealand area and finded out that parts of 'trunk' highways in openstreetmap (like the sh1) are not always tagged as oneway=no if only draw as a single line. In mapping terms it shoud have been two lines or at least explicitly marked as oneway=no. The style add's by default oneway=yes on trunk highways if omitted.

By disabling row 118 in the lines file it worked for me to route the same as you did.

disable: highway = trunk | highway = trunk_link { add oneway = yes ; add mkgmap:numbers = false }

I'll come up with a new final version after i did better testing with the other routing improvements i made searching for this issue.

hope it helps, let me know kind regards, Joris

ps: Routing by bike ignores oneway mostly and did work for me also with the previous version.

Joaoha commented 4 years ago

Hi, Thanks for working on this! you are doing an amazing job and I'm sure the community will be thankful! I know I will.

Joaoha commented 4 years ago

Hi Joris, just a quick update. I've done a bit more testing and found that routing is also having issues when the activity profile is Set to "Not Avoid Tool Roads". image

Using "Avoid Toll roads" works fine. image

Hope it helps

Jorisbo commented 4 years ago

Hi Joaoha,

Thank you for testing! Your questions about routing made me do al lot of rework the last weeks.

It is a real hazard between what garmin can do and what osm data gives us. Easiest way is to allow routing on every street, but then you can also drive up a train platform or bus_guideway as well or pass some peoples private domains, like vineyards. For example: If osm is tagged as: access=private & toll=yes , the common rules tell us that this should be interpreted as a NO unless explicitly motorcar=yes is also tagged. I found 34 stretches of toll-motorway with this kind of behavior making Garmin to avoid these.

Anyway…. I reworked a complete new access rules scheme which fights this mistagging/interpretation etc. and I hope this helps a lot.

Attached the newest update not yet published on github. Its has a lot of other improvements as well. Funny: I should have been in Portugal today 😊 I booked hotels and flight etc, for a two week bike tour from Lisboa around Alentejo and back . But Corona visit us in between.

At least I can now route your proposal Let me know what you think ! image 20200515 Style - Jbm.zip

Kind Regards Joris

Jorisbo commented 4 years ago

not to forget, you need an updated typ-file as well, there are some changes which otherwise result in ugly icons and lines.

jbm.zip

Joaoha commented 4 years ago

Hey Joris,

Thanks a lot for this, I'll test it out! Let me know if I can give you some tips about driving around Portugal, I'm originally from there but moved to New Zealand 7 years ago and now I live in Australia for the last year.

Yes I understand your points about Garmin vs OSM, I'm trying to fix some OSM data myself to improve accuracy, I guess we have to trust that once we have a good logic base as data gets added to OSM the garmin resulting maps will become better. I'm really enjoying the experience but I'm just starting this journey so I'm learning as I go. Documentation is terrible but with time and help from guys like you the maps are getting really good, much better than the ones we can download from garmin.openstreetmap.org.

So thank you a lot for helping. And I'm sorry covid ruined your plans to drive around portugal, it is a beautiful country and I hope you get the chance to go there as soon as this is over.

BTW, what tools do you use to build your maps? I'm using MapUploader6 from pinns.co.uk.

Cheers Joao

On Sat, May 16, 2020 at 5:26 AM Jorisbo notifications@github.com wrote:

not to forget, you need an updated typ-file as well, there are some changes which otherwise result in ugly icons and lines.

jbm.zip https://github.com/Jorisbo/Mkgmap-Mapnik-Style-Garmin/files/4636718/jbm.zip

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Jorisbo/Mkgmap-Mapnik-Style-Garmin/issues/2#issuecomment-629434013, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIMJL66C3RW5XXITLZ7JCDLRRWJNNANCNFSM4MAYW5VQ .

Jorisbo commented 4 years ago

Hi

I use an excel sheet which builds the maps. I never published it. Works only for Windows. You need to trust my visual basic macro's. But after you configured all the folders for DEM, mkgamp etc on the config sheet, it is pretty simple one-click forward. You can build and rebuild as many maps you want at the same time or overnight. You only drop a new geofabrik download somewhere now and then. It will detect that this download is newer and resplit everything again otherwise it re-uses the previous one.

You need quit a lot of diskspace (3-4 times the geofabrik download) as you get a lot of copies of the data after the original download is optionally merged with 'freizeitkarte'- contour lines, splitted , afterwards you have the optional gmapsupp.img file, the windows installer, the final basecamp map etc....

Excel is not creating the map. It generates a windows cmd (batch) file which is executing the creation proces. You kan close excel after the build is started or even just reuse the created cmd files.

You can give it a try. No indepth support it was never intended as a real end-user thing. The second Tab (analyser) can read the mkgmap.debug output wich comes wit some map styles.

mmkgmap (stripped version).zip](https://github.com/Jorisbo/Mkgmap-Mapnik-Style-Garmin/files/4637835/mkgmap.stripped.version.zip)

Joaoha commented 4 years ago

Thanks for that! I'll give it a go, I really like mapuploader 6, have a look. I'm trying the new style but getting these messages while building: Warning: Option style-options doesn't specify 'jbmoptionfixme' (for mkgmap:option:jbmoptionfixme) Warning: Option style-options doesn't specify 'jbmoptionfixme' (for mkgmap:option:jbmoptionfixme) Warning: Option style-options doesn't specify 'jbmoptionbicycle' (for mkgmap:option:jbmoptionbicycle) Warning: Option style-options doesn't specify 'jbmoptionbicycle' (for mkgmap:option:jbmoptionbicycle) Warning: Option style-options doesn't specify 'jbmoptiondebug' (for mkgmap:option:jbmoptiondebug)

tried setting the options in the options file but no luck...

Jorisbo commented 4 years ago

You can ignore these messages or if you don’t want to see them: add the following to your build arguments

--style-option=jbmoptiondebug=false;jbmoptionpersonal=false;jbmoptionfixme=false;jbmoptionbicycle=false

If you make them true then….

Kind regards Joris

Van: Joaoha notifications@github.com Verzonden: zaterdag 16 mei 2020 12:02 Aan: Jorisbo/Mkgmap-Mapnik-Style-Garmin Mkgmap-Mapnik-Style-Garmin@noreply.github.com CC: Jorisbo Jorisbo@hotmail.com; Comment comment@noreply.github.com Onderwerp: Re: [Jorisbo/Mkgmap-Mapnik-Style-Garmin] Routing issues (#2)

Thanks for that! I'll give it a go, I really like mapuploader 6, have a look. I'm trying the new style but getting these messages while building: Warning: Option style-options doesn't specify 'jbmoptionfixme' (for mkgmap:option:jbmoptionfixme) Warning: Option style-options doesn't specify 'jbmoptionfixme' (for mkgmap:option:jbmoptionfixme) Warning: Option style-options doesn't specify 'jbmoptionbicycle' (for mkgmap:option:jbmoptionbicycle) Warning: Option style-options doesn't specify 'jbmoptionbicycle' (for mkgmap:option:jbmoptionbicycle) Warning: Option style-options doesn't specify 'jbmoptiondebug' (for mkgmap:option:jbmoptiondebug)

tried setting the options in the options file but no luck...

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Jorisbo/Mkgmap-Mapnik-Style-Garmin/issues/2#issuecomment-629620595, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHSGBJDOXVBQCZMDKQQLWJ3RRZQCLANCNFSM4MAYW5VQ.

Joaoha commented 4 years ago

Hi Joris, Further testing shows that highway= path motor vehicles = no is being use for routing. Example: https://www.openstreetmap.org/edit?way=17165713#map=16/-40.6899/175.5465

image

As least with profile motorbiking. Driving profile draws two direct routes then follows the path. I've checked both of these paths segments don't have Motor Vehicles set or set to No.

Putara Road and Milne Lane to Path2.zip

Jorisbo commented 4 years ago

Hi Joao,

Thanks again for testing, I had the same behavior earlier somewhere else. Didn’t bother too much at that time because I was still focusing on the bigger picture. Strange thing is : my style is oke, the .IMG tile generated by mkgmap is oke. If I look at the generated Tile which is used by garmin; Then only foot & bicycle are allowed and cars are not, but still basecamp routes you over this line. Or basecamp is inpredictable or I don’t understand how they decide. If I switch to bike it makes a large u-turn around the mountains. That’s what you expect form vehicle ‘car’ as well.

Joris

[cid:image001.jpg@01D62D0F.2D584FD0]

Van: Joaoha notifications@github.com Verzonden: maandag 18 mei 2020 10:03 Aan: Jorisbo/Mkgmap-Mapnik-Style-Garmin Mkgmap-Mapnik-Style-Garmin@noreply.github.com CC: Jorisbo Jorisbo@hotmail.com; Comment comment@noreply.github.com Onderwerp: Re: [Jorisbo/Mkgmap-Mapnik-Style-Garmin] Routing issues (#2)

Hi Joris, Further testing shows that highway= path motor vehicles = no is being use for routing. Example: https://www.openstreetmap.org/edit?way=17165713#map=16/-40.6899/175.5465 [image]https://user-images.githubusercontent.com/35165691/82188509-54994700-9931-11ea-9e9c-22ffd4b062cc.png

As least with profile motorbiking. Driving profile draws two direct routes then follows the path. I've checked both of these paths segments don't have Motor Vehicles set or set to No.

Putara Road and Milne Lane to Path2.ziphttps://github.com/Jorisbo/Mkgmap-Mapnik-Style-Garmin/files/4642832/Putara.Road.and.Milne.Lane.to.Path2.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Jorisbo/Mkgmap-Mapnik-Style-Garmin/issues/2#issuecomment-630015201, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHSGBJAAD6WIY3KLURQG5SDRSDTT5ANCNFSM4MAYW5VQ.