[mkgmap-dev] To do: If-Then-Else
From Gerd Petermann gpetermann_muenchen at hotmail.com on Sun Feb 12 11:00:09 GMT 2017
Hi all, I see no need to use if-then for this. Attached is a quick patch to add an option like --style-option=<val> to mkgmap. If specified, it tells mkgmp to add the tag mkgmap:style-option=<val> to each element before style processing. Sample usage with the attached patch: java -jar mkgmap.jar --x-style-option="car,show_farms" ... test.osm Style rule: landuse=farmland & mgkmap:style-option ~ '.*show_farms.*' [0x10f01 level 1] or if applied in the if-then branch: if (mgkmap:style-option ~ '.*show_farms.*') then landuse=farmland [0x10f01 level 1] end If you think that would be useful I'll add help and docu for it so that one can use it without the -x prefix. Gerd style-option_v0.patch <http://gis.19327.n8.nabble.com/file/n5891095/style-option_v0.patch> popej wrote > I develop a single style for my topo maps, but I need some possibility > to get a small variation in style depending on region. For example I > prefer to show landuse=farmland on a map of Africa but to remove it on a > map of Europe. So instead of maintaining 2 nearly identical styles, I > would like to get a conditional statement, something like: > > if (SHOW_FARMS) ( > landuse=farmland [0x10f01 level 1] > ) > > and then add (or not) an option to mkgmap like --style-define=SHOW_FARMS -- View this message in context: http://gis.19327.n8.nabble.com/To-do-If-Then-Else-tp5890726p5891095.html Sent from the Mkgmap Development mailing list archive at Nabble.com.
- Previous message: [mkgmap-dev] To do: If-Then-Else
- Next message: [mkgmap-dev] To do: If-Then-Else
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list