logo separator

News

Improvements in turn restrictions

14
Apr

The latest version of mkgmap now has much better support for restriction relations.

Here are the main things that are newly implemented:

  • Restrictions that prohibit going between two node via a particular way.
  • restrictions no_entry or no_exit
  • specific vehicle type, e.g. type=restriction:motorcar or restriction:motorcar=no_u_turn
  • fixes possible error if different roads connect the same nodes (old code possibly saved the restriction for the wrong road)
  • detects obsolete restrictions, e.g. when a oneway doesn't allow to enter the road or when the restiction applies to motor_vehicles only and the road is a cycleway.
  • if the style creates multiple routable ways for one OSM way, the restriction is added for all needed combinations

There are a lot of bug fixes too, so it should all work a lot more smoothly. Use version r3189 or higher for all the fixes.

Announcement: version r3116 is a major upgrade for routing

19
Mar

There have been almost no changes to how mkgmap deals with routing for several years now. So I am very happy to announce that the latest version of mkgmap now saves much improved routing information to the map. This allows better routes to be calculated and over longer distances in many cases.

Although there are no deliberate backward incompatibilities, if you have a heavily customised style, you should carefully examine any workarounds to force particular routing behaviour as it may no longer be necessary or may work differently now.

Also the new version improves the fidelity of features on the map, such as roundabouts and parallel lines. It happens that positions can only be represented to within 1-2 meters in a Garmin map, whereas positions are recorded much more accurately than that within OSM. So some approximation is necessary, however this was made worse since mkgmap would reduce the precision right at the beginning, allowing errors to build up as the data was manipulated. Now the extra accuracy is kept throughout all processing until the map data is written and care is taken to preserve angles so that lines that are meant to be parallel are more likely to stay that way and are less likely to cross or appear to cross.

Both these improvements were added by Gerd.

[ Updated: modified to say that roundabouts and parallel lines are a better example of improvement than buildings. Buildings will be improved in a subsequent update ]

More flexibility in style files - style changes required!

22
Dec

Since r2906 there are some important changes in the style processing which gives the style developer more control about converting OSM elements into the Garmin map elements. As a benefit the routing network is up to 25% smaller which results in faster route calculation and slightly smaller img files.

Changes in the style system:

  • Styles can now have a <finalize> block. This block is executed for each element if an element style definition matches. The finalize block must contain actions only. This is sometimes useful for general rules and to assign the numerous mkgmap:* tags.
  • The four labels to pois/lines/roads/polygons are no longer assigned automatically. They must be assigned using the name and addlabel function. This also means that ref tags are no longer used as labels automatically.
  • Access restrictions of roads are now defined by setting special mkgmap:* access tags (mkgmap:car, mkgmap:foot, mkgmap:bicycle, mkgmap:truck, mkgmap:bus, mkgmap:taxi, mkgmap:emergency, mkgmap:delivery). Roads are blocked for a specific vehicle type if the mkgmap:<type> is set to the value no. The new addaccess and setaccess actions help to assign all values at once.
     Example:
     highway=motorway { set mkgmap:foot=no }
     This rule blocks access of pedestrians to motorways.
    
  • mkgmap:carpool does no longer automatically set all access restrictions. In the trunk mkgmap:carpool=yes lead to set all access restrictions to no except emergency, bus and carpool. It is not fully clear if the bit toggled by mkgmap really controls if a road has a carpool lane or not. So use it with caution.
  • The road speed is no longer automatically calculated using the maxspeed tag. New style functions maxspeedkmh() and maxspeedmph() allow to perform the same by setting the mkgmap:road-speed-class tag. Due to this change the --ignore-maxspeeds option is superfluous and has been removed.

The changes listed above require a change of all style files. But there are three new include files (inc/compat_points, inc/compat_lines, inc/compat_polygons) which ensure compatibility to pre-r2906 releases. They need to be added to the new finalize section.

Example lines file:

 ...
 boundary=political [0x1c resolution 19]
 
 include 'inc/water_lines';
 include 'inc/contour_lines';
 
 # add the following lines to your lines file
 <finalize>
 include 'inc/compat_lines'; 

Please refer also to the style manual.

House numbers

06
Oct

There are now a number of places where house numbers are well mapped and it would be nice to be able to see them on your GPS. In fact this has been a much desired feature for a long time now.

This is now possible, and has been for some time - I suck at getting the news out promptly.

It works with both polish format input files and also with regular OpenStreetMap format files.

For files in Polish format, the house numbers support is complete and any differences from what you were expecting should be reported as a bug.

For OSM files things are a bit more tricky because there are various systems of recording housenumbers used in different parts of the world, and not all of them will be recognised.

For OSM files, you need to add the --housenumbers option to get house numbers in the map.

Of course if there are no numbers in the OSM data in your region then you will need to get out and map some to take advantage of this. You will need to add addr:street and addr:housenumber to nodes or polygons representing the house.

Now mkgmap has a real overview map

31
May

Earlier today, mkgmap developer Gerd Petermann merged his changes to create a proper overview map into trunk. Update now or go and get version r2636 or later from the download page.

This is an important feature that has been missing from mkgmap for a long time. The overview map exists to display a low resolution map of the whole area of a set of map tiles.

Although there has always been an overview map, as it is essential to displaying in MapSource or BaseCamp, it has been empty apart from the polygons that show the area covered by each tile in the map.

There was another problem: to compensate for the lack of an overview map most map styles, including the default one, contained extra map levels so that the map was still visible when zoomed out to the scale of regions and countries. This extra data made the map slower when scrolling on GPS devices.

So the change has a double benefit; the map is still visible when zoomed out far enough to show whole countries and continents and can also be faster to scroll on GPS

The new enhanced overview map will be automatically generated when creating a map without having to make any changes. There are however a couple of new options to control what happens.

--overview-levels
like levels, specifies additional levels that are to be written to the overview map. Counting of the levels should continue. Up to 8 additional levels may be specified, but the lowest usable resolution with MapSource seems to be 11.
--remove-ovm-work-files
If overview-levels is used, mkgmap creates one additional file with the prefix ovm_ for each map (*.img) file. These files are used to create the overview map. With option --remove-ovm-work-files=true the files are removed after the overview map was created. The default is to keep the files.

Further improvements

In addition to the overview map, there is also a slew of improvements and bug fixes that have been added.

Fixes

There are fixes for maps that cover a large portion of the globe or extend to 180 degrees longitude.

  • fix wrong interpretation of 0x800000 as -180.0 degrees for maxLon
  • fix treatment of very long lines that cross the planet

Optimizations

  • The polygon filter allows larger polygons.
  • SeaGenerator generates fewer "sea-only" and "land-only" polygons when precomp-sea is used.

Both reduce the img size, esp. for maps containing large sea only areas.

An option to better control the minimum size of a polygon that can now be configured per level.

--polygon-size-limits=limits-code
Allows you to specify a different min-size-polygon value for each resolution. For example:
  --polygon-size-limits="24:12, 18:10, 16:8, 14:4, 12:2, 11:0"

If a resolution is not given, mkgmap uses the value for the next higher one. For the given sample, resolutions 19 to 24 will use value 12, resolution 17 and 18 will use 10, and so on. Value 0 means to skip the size filter. Note that in resolution 24 the filter is not used.

Changes regarding styles

  • The support for the obsolete map-features.csv file was removed.
  • Level ranges can now use min-max or max-min
  • There is now an option --check-styles which will flag issues in the style that are known to cause problems.

Other changes

  • A few checks are performed regarding the plausibility of the given options and input files to help beginners.
<< Earlier news Later news >>

Latest commits

  • splitter-r654 - add note that splitter doesn't handle holes in *.poly files.
    05 apr 2024
  • mkgmap-r4919 Avoid possible integer overflow in blocksize calculation when gmapsupp contains large number of tiles.
    04 apr 2024
  • mkgmap-r4918 add surface=chipseal to group of surfaces which means paved.
    06 mar 2024
  • mkgmap-r4917 fix typos in documentation: $LONG_DATE$ -> $LONGDATE$, $SHORT_DATE$ -> $SHORTDATE$.
    18 feb 2024
  • mkgmap-r4916 sortResource_v3.patch (with updated date in comment) by Ticker Berkin.
    13 oct 2023
See more...