[mkgmap-dev] Request to rollback at least rev 2747 - or give the access part a complete rework, as of right now it's broken...
From Felix Hartmann extremecarver at gmail.com on Thu Oct 17 17:29:29 BST 2013
On 17.10.2013 18:20, WanMil wrote: >> addaccess / setaccess = either it's not working, or I don't understand >> it! - merge-roads branch > > It's not yet documented so it's not a shame :-) > > mkgmap:access is no longer used. > > addaccess no > is a shortcut for > add mkgmap:foot='no'; add mkgmap:car='no'; add mkgmap:bike='no'; add > mkgmap:bus='no'; add mkgmap:taxi='no'; add mkgmap:truck='no'; add > mkgmap:emergency='no'; add mkgmap:delivery='no'; add > mkgmap:throughroute='no'; > > setaccess no > is a shortcut for > set mkgmap:foot='no'; set mkgmap:car='no'; set mkgmap:bike='no'; set > mkgmap:bus='no'; set mkgmap:taxi='no'; set mkgmap:truck='no'; set > mkgmap:emergency='no'; set mkgmap:delivery='no'; set > mkgmap:throughroute='no'; yes but that requires much more space. And while add and set is possible to be used; the same does not apply to delete. So far set mgkmap:access would just set this tag, not actually at the time of setting it, unset the other keys. Without this shortcut, this is not possible anymore! The following example cannot be achieved without it! highway=private & route=bicycle & tracktype=grade2 tracktype=grade2 {set mkgmap:car=no} highway=private {set mkgmap:access=no} route=bicycle {delete mkgmap:access } result until now: the highway is mkgmap:car=no, result without shortcut: the highway is open for all traffic. Really, this shortcut is needed. I cannot replace it in my styles (except by adding a separate key, and check for that separate key each time I do any access/bicycle/car/whatever operation.... Why do you want to remove it so badly? Is it a performance hog? I can test that tomorrow - but I wouldn't believe that it impairs performance... > > > Mapping multiple values to 'no' can be easily done with the subst > operator: > > bicycle=* { set mkgmap:bike='${bicycle|subst:private=>no}' } > yes - but that is much more code than a simple {set bicycle=private} and knowing it's interpreted as no. However while without mkgmap:access shortcut, I basically cannot ever update mkgmap anymore, for private It's not so many lines in my code which get more complicated. > > Please have a look at the inc/access file in the default style. It > might give you some ideas how to assign the access fields. > > WanMil > > >> >> So, today for the first time since a couple of weeks I had full day time >> to work through mkgmap changes, >> and I must say I don't understand the addaccess / setaccess concept >> at all. >> >> mkgmap:access is far better, the intention of making styles-files easier >> by addaccess/setaccess definitely turned wrong, or I don't understand >> it... >> >> How can I mass replace the old rules? Or better, how can I replace this >> old rule at all? I don't see how this is possible now. >> >> e.g. >> ( mkgmap:access=no | mkgmap:access=private ) & ( mkgmap:bicycle=yes | >> mkgmap:bicycle=permissive ) {delete mkgmap:access} ? >> >> (XXXX | YYYY & ( mkgmap:bicycle=yes | mkgmap:bicycle=permissive ) {????} >> # I put mkgmap:bicycle here, because it makes much more sense than >> mkgmap:bike.... >> >> (setaccess=no | setaccess=private) & ( mkgmap:bicycle=yes | >> mkgmap:bicycle=permissive ) {????} ? >> >> 1. XXXX : testing for access=no is wrong, because I don't want to test >> on what has been in the data, but what value I previously set. And no - >> setting a second key to verify what happend using addaccess setaccess >> would completly destroy any making it simpler... >> Therefore I suppose now there is one term, and if I put it in {} then it >> means an action, but if it's not, then it means it is a test. Very very >> bad idea too. >> >> >> 2. YYYY: well as long as "setaccess private" works - and you can search >> for it by setaccess=private, it's still the same problematic case as >> above. >> >> >> 3. ???? {delete setaccess} what about if it was using add? It makes no >> sense at all. And as I often wrote before, there is a difference between >> setaccess=yes and setaccess not existing. >> >> >> >> 4. As for a complete rework, I still don't see why the old system needed >> to be changed! There is no new functionality at all, mkgmap didn't get >> faster but slower, and style-files get much more complicated! >> If it's about making it possible to merge more roads, then I still don't >> see it. mgkmap shouldn't look if the tags in the data are the same, but >> if the outcome as it will be put into the map, is the same. >> So yes, also for the old notation a highway=primary & bicycle=private >> should be merged with a highway=primary & bicycle=no, but not with >> highway=primary & bicycle=yes... >> >> I reworked my style to use mkgamp:?? notation, so going back will mean >> again lot's of hours of work (or alternatively trying to backport all >> changes since that change), so I would be happy if we keep mkgmap:??, >> but I think the easiest would be to keep the old notation system, and >> add a file to the style-file where you can define how e.g. private or >> destination are handled (yes or no). >> >> >> >> >> >> >> >> >> >> >> > -- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org
- Previous message: [mkgmap-dev] Request to rollback at least rev 2747 - or give the access part a complete rework, as of right now it's broken...
- Next message: [mkgmap-dev] Request to rollback at least rev 2747 - or give the access part a complete rework, as of right now it's broken...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list