logo separator

[mkgmap-dev] Divide number in style file

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Fri May 7 09:56:49 BST 2021

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


More information about the mkgmap-dev mailing list