logo separator

[mkgmap-dev] Commit r4568: - split road in StyledConverter if it has too many points. A road can refer to max 127 Polylines (each with < 255) points

From svn commit svn at mkgmap.org.uk on Tue Sep 8 09:45:11 BST 2020

Version mkgmap-r4568 was committed by gerd on Tue, 08 Sep 2020

- split road in StyledConverter if it has too many points. A road can refer to max 127 Polylines (each with < 255) points
- reduce severity for size check as there is no problem with a single object that requires more than MAX_RGN_SIZE bytes
- change assert to throw MapFailedException when road has more than 127 Polylines (should never happen)

The code in MapSplitter might need more changes. It checks for limits which don't exist in the IMG format.
As long as WANTED_MAX_AREA_SIZE is smaller than MAX_RGN_SIZE this doesn't seem to produce problems.

I think a size problem only occurs when a MapArea contains different kinds of objects, e.g. lines and polygons. A 16 bit offset is written to indicate the position of the first object of each further kind. This offset must not be too large and thus the preceding data must fit into an area less than ~0xfff8. 


http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4568


More information about the mkgmap-dev mailing list