logo separator

[mkgmap-dev] [Patch v1] improve LinePreparer to reduce img size

From Gerd Petermann GPetermann_muenchen at hotmail.com on Sun Jul 17 10:53:32 BST 2016

Hi all,

Attached is 2nd version of the patch.

The improvements are a bit better, although I've removed one

change in PolygonSplitterBase which reduces the number of splits

in rare cases (e.g. when the map contains large sea areas).

I think this change is okay, but it is not related to the LinePreparer

and thus should be handled separately.


A new binary containing the attached patch(es) is here:

http://files.mkgmap.org.uk/download/302/mkgmap.jar


If I here no complains I'll commit both patch next wednesday.


Gerd

________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Alexandre Loss <alexandre.loss at gmail.com>
Gesendet: Samstag, 16. Juli 2016 19:43:23
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] [Patch v1] improve LinePreparer to reduce img size

Great discovery Gerd!


Enviado do meu iPhone

Em 16 de jul de 2016, ?s 14:28, Gerd Petermann <GPetermann_muenchen at hotmail.com<mailto:GPetermann_muenchen at hotmail.com>> escreveu:


Hi all,


during the last days I tried to find more about the way how mkgmap stores

polygons, esp. why we have some limits. While doing that I stumbled over an

old comment in LinePreparer.java:

        // I don't care about getting the smallest possible file size so
        // err on the side of caution.

which made me curious because I do care ;-)


I found out that Garmin offers a "trick" in the delta encoding which allows

to reduce the needed bytes in some cases, the imgformat-1.0.pdf

explains this in detail, search for " only the sign bit is set ".

This "trick" helps esp. well when coastline polygons or rivers are stored.


I can explain this more detailed if somebody likes to know more,

for now I'd like to hear if the trick causes any problems, I did not find any

so far.

A binary with this and a slightly improved overview_levels_v2.patch

can be found here:

http://files.mkgmap.org.uk/download/301/mkgmap.jar


Depending on the data a single tile with size ~5MB may be reduced by 50 - 500+kB.


Gerd

<reduceImgSize_v1.patch>
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk>
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160717/9829739d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reduceImgSize_v2.patch
Type: application/x-download
Size: 10871 bytes
Desc: reduceImgSize_v2.patch
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160717/9829739d/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: overview_levels_v3.patch
Type: application/x-download
Size: 4489 bytes
Desc: overview_levels_v3.patch
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160717/9829739d/attachment-0003.bin>


More information about the mkgmap-dev mailing list