On 18.01.2010 15:18, Marko Mäkelä wrote: > Hi Felix, Steve, > > On Mon, Jan 18, 2010 at 03:00:06PM +0100, Felix Hartmann wrote: > >> rcn_ref=10 [0x02 resolution 24 continue] >> rcn_ref=10 [0x03 resolution 24] --- is identical to the line above and >> will not work. >> > Is there any reason for this? > > I don't know. however if you know how it works, it is quite practical. >> No, the trick is not working, as the you cannot run "continue" for >> asking the same value twice. The idea of continue was more that if you >> have a single node tagged amenity=restaurant& amenity=hotel that >> neither is dropped (so you find both via the search function), or that >> if a line is tagged higwhay=residential& railway=rail both will be >> rendered/included in the map. >> > Could the "continue" allow multiple matches for the same set of keys? > If the "continue" is already in widespread use, we could avoid breaking > compatibility by introducing a "continue_same" keyword. > > Would be best. There are quite a few "prominent" mapmakers using the continue statement. So changing the behaviour will mean adapting the style. >>> Ultimately, I would like to see something like this: >>> >>> (rcn_ref % 100 / 100) = 1 [symbol for '1__' continue] >>> (rcn_ref % 10 / 10) = 1 [ symbol for '_1_' continue] >>> (rcn_ref % 10) = 1 [ symbol for '__1' ] >>> >>> You might need to prefix these rules with rcn_ref=*. >>> >>> >> Well that would be nicer. If you integrate these regex operators, maybe >> you could come up with a conversion for units (mph --> kph) too. >> > Actually, now that you mention regex (quite different from the arithmetics > that I suggested above), you should be able to do something like this: > > rcn_ref=*& rcn_ref~'.*1..' [symbol for '1__' continue] > rcn_ref=*& rcn_ref~'.*1.' [symbol for '_1_' continue] > rcn_ref=*& rcn_ref~'.*1' [symbol for '__1' continue] > and for leading zeroes > rcn_ref=*& rcn_ref> 9& rcn_ref~'.*0.' [symbol for '_0_' continue] > Well that code would work (but not with continue)... so I'll have to adapt it...
>> It would be enough if: >> distance=125miles could be seperated into distance=125 >> distance:unit=miles for further processing. >> > OK, this could be doable by setting some variables to what is matched > by the regexp (think of $1, $2 et al of Perl and other languages). > > Marko > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev@lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev