[mkgmap-dev] !< not working -- problem with conditions in style-file.From Felix Hartmann extremecarver at gmail.com on Wed Nov 17 21:30:37 GMT 2010
On 17.11.2010 20:32, Torsten Leistikow wrote: > aighes schrieb am 17.11.2010 20:21: >> instead of !< you could use => or>=. I don't know if there is a difference. >> For example: >> & ( tracktype>=5 | tracktypeadded=yes ) > I think he wants to have > > (tracktype!=* | tracktype<5) > > The difference is, when there is no tracktype defined at all. For all ways that have no tracktype, I add a tracktype if I think a certain surface value reflects a tracktype. Then later on however, depending or not whether the tracktype existed naturally or was added based on surface, do or do not do an action. And this action is also dependant on the value of the tracktype itself. The full command working goes like this: sac_scale=hiking & ((tracktype!=1 | tracktype!=2 | tracktype!=3 | tracktype!=4) | tracktypeadded=yes ) [0x07 ...] And I tried to shorten it by changing it to sac_scale=hiking & ( tracktype!<5 | tracktypeadded=yes) but this does not give the same result - because for tracktype=5 the condition of tracktype smaller 5 not existing was not fullfilled. (double negation - seams not to be like by programmers either...). Or in more detail so you can understand what I want. Below is the outcome I want to have for tracktype=1 and respectively tracktype=5 if tracktypeadded=yes THEN build 0x07 (no matter if tracktype exists, and no matter which value it has). if tracktype=5 THEN do build 0x07 (if tracktype does not exist, or tracktype has any value but 1-4 then it should also go through) if tracktype=1 but tracktypeadded!=yes THEN do not build 0x07 ((tracktype!=* | tracktype<5) | tracktypeadded=yes) does not work because the outcome would be if tracktypeadded=yes THEN build 0x07 if tracktype=5 THEN do no build 0x07!!!!!!!!!!! if tracktype=1 THEN do not build 0x07 !!!!!!! is the problem. Because in case that neither tracktype is under 5 nor tracktypeadded=yes I still do want 0x07 to be built. What actually works and at the same time makes the command shorter is: sac_scale=hiking & ((tracktype!=* | tracktype>4) | tracktypeadded=yes) still I would fine sac_scale=hiking & ( tracktype!<5 | tracktypeadded=yes) to be more elegant and shorter (though yes I do admit, double negations do cause confusion).
- Previous message: [mkgmap-dev] !< not working -- problem with conditions in style-file.
- Next message: [mkgmap-dev] !< not working -- problem with conditions in style-file.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list