[mkgmap-dev] Divide number in style file
From Felix Hartmann extremecarver at gmail.com on Fri May 7 10:56:44 BST 2021
yes I figured out the only current possible division would be to convert ft to mt - that could be run against population number as well of course.. Dividing the population number to get maps of India or China a bit less cluttered without using a specific style would be quite handy. Though yes - besides improving rules for cities not much else use of a division factor for values that I can think of. So right now only 3.28, 3.28^2, 3.28^3 and so on is possible (i did not actually check if it is possible to convert twice, but think so). On Fri, 7 May 2021 at 16:56, Ticker Berkin <rwb-mkgmap at jagit.co.uk> wrote: > Hi Felix > > I don't think there is any way to do maths on tag values. > > It should not be too difficult to implement additional variable filters > that do a simple maths op with a constant, eg: > {set population='${population|divide:"7"}'} > > Ticker > > On Wed, 2021-05-05 at 22:58 +0800, Felix Hartmann wrote: > > Is it possible to divide a number by a factor in the style file? > > > > ( mkgmap:country=CHN | mkmgap:countrz=CN | mkgmap:country=IND | > > ^^ > > mkgmap:country=IN ) & ( place=city | place=island | place=town | > > place=village ) & population=* {set population='${population}/7'} > > > > Did not work. I intend to divide the population in cities in China > > and India because otherwise cities clutter up the map there (also in > > India they do not use admin level ... which could be an alternative). > > > > -- > > Felix Hartman - Openmtbmap.org & VeloMap.org > > > > _______________________________________________ > > mkgmap-dev mailing list > > mkgmap-dev at lists.mkgmap.org.uk > > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > -- Felix Hartman - Openmtbmap.org & VeloMap.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20210507/c44dd962/attachment.html>
- Previous message: [mkgmap-dev] Divide number in style file
- Next message: [mkgmap-dev] Divide number in style file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list