logo separator

News

Converting units

24
Nov

There has always been a way to convert a tag value from meters to feet, this was originally for contour heights which need to be in feet, but the default for OSM is for them to be in meters.

With the release of version r3353 these conversions are much more useful and can be applied to speeds as well as lengths. They also take into account any unit that is already specified.

So for example if you specify a conversion of meters to feet, then "100" will be converted to "328", "100m" will be converted to "328" but "100ft" will be left as "100". Furthermore "100km" would result in "328000". If any of the units are not recognised then the value remains completely unchanged.

Input Result
100 328
100m 328
100ft 100
100km 328000
100xyz 100xyz

Here are some examples.

natural=hill & height=* {
	set height='${height|conv:"m=>ft"}';
    }

highway=* & maxspeed=* {
	set limit='${maxspeed|conv:"kmh=>mph"}';
    }

The possible units are:

  • Length: m, km, ft (feet), mi (miles).
  • Speed: mph; km/h (or kmh, kmph), knots

Crash on compiling recent south american OSM maps.

21
Nov

A recent change to data in Columbia, South America in Open Street Map may cause a problem when creating a map of that area.

There is a long standing bug in mkgmap that results in a crash when compiling the object http://www.openstreetmap.org/way/313259878 which is in Columbia. The addr:housenumber is ":702" which triggers the bug. Probably that is just a typo and it should be just "702", however this should not cause a crash in mkgmap.

The problem is now fixed in r3354, so you should upgrade if affected by this problem. I think you will only see it if using the --add-pois-to-areas option.

Due to the nature of the fix, the resulting .img files may be a little smaller than before.

Unicode searching. Now you can.

18
Jun

For quite some time it has been possible to build a map using unicode to display characters in various languages.

Now searching should also work in versions r3294 and later.

All of Western, Central and Eastern European characters should be available as well as Arabic, Greek and various others. It is unlikely to work with Chinese characters and that will require further investigation.

Ensure that you are using the options --code-page=65001 --index --route as well any others that you need.

Quoting variable filter arguments

04
Jun

You can now quote the argument to a variable filter in a style file.

A simple contrived example:

# Fix short form and mis-spelling
highway=residential { set name '${name|subst:"(Raod|Rd)~>Road"}' ; }

For backward compatibility you do not have to do this and all existing styles should work as they are. However I would recommend that you start to quote all arguments that are more complex than a simple word. Before this change it was impossible to use a pipe symbol within a regular expression since it would be seen as the start of the next filter.

Improved splitter

25
May

Splitter now has a new split algorithm that usually results in fewer, more evenly sized tiles.

The test generator is > 10 times faster. This allows a deeper search for good splits. A few errors where fixed which sometimes prohibited to find a good split, but also sometimes helped to find one.

A new option --search-limit can be used to increase/decrease the amount of time the splitter tries to find a good split. The larger the input file the higher this value should be. For planet, --search-limit=1000000 is okay, --search-limit=10000000 is better.

<< Earlier news

Latest commits

  • mkgmap-r3356 commit styleStats-v5.patch + small change to make unit tests work.
    27 nov 2014
  • mkgmap-r3355 simplify singleton implementation.
    24 nov 2014
  • display-r439 Declare variable holding string as const..
    21 nov 2014
  • display-r438 The POI properties section has its own offset multiplier..
    21 nov 2014
  • mkgmap-r3354 Crash on POI non-numeric address number.
    21 nov 2014
See more...

Developed withThe best Java IDE