[mkgmap-dev] issues with tile boundaries
From Gerd Petermann gpetermann_muenchen at hotmail.com on Sat Mar 16 09:09:05 GMT 2013
Hi Minko, > I tried to align the polygon files along a Garmin raster with units divisable by 2048. > Howver, the splitter still does another sort of rounding and draws a different polygon, sometimes it is only one garmin unit difference, but this causes that the polygons doesn't touch each other, and also are not a multiple of 2048 which I think can cause those gaps and artefacts along the borders. > > Am I correct? I can manually edit the areas.lists file to make the tiles one garmin unit bigger to see if this will improve the map, but I think the splitter could be improved here? 1) According to Steve the alignment to 2048 units is not mandantory, the ony important point is that you don't have gaps. The value 2048 results from the default resolution 13 : 2 ^ (24-13) = 2048. 2)The rounding in splitter works like this (l is the value in degrees): public static int toMapUnit(double l) { double DELTA = 0.000001; // TODO check if we really mean this if (l > 0) return (int) ((l + DELTA) * (1 << 24)/360); else return (int) ((l - DELTA) * (1 << 24)/360); } (1<<24) / 360 gives ~ 46603,378 The comment for the DELTA value is alarming. In mkgmap a slightly newer code is used with double DELTA = 360.0D / (1 << 24) / 2; //Correct rounding @Steve: I assume it would be better to use the same code in splitter ? 3) It was recommend by Henning to fit the tiles into the polygon, see http://gis.19327.n5.nabble.com/splitter-r269-tp5741292p5741673.html Regarding improvements: If I got this right your problem is that you don't have enough memory to split Europe with option keep-complete, and the bottleneck is in the " handle-problem-list" phase. I see these options to help in your case: 1) Complex: Implement an algorithm in splitter which does something similar to your approach: Partition the input file into a few large areas and calculate each partition seperately. 2) Simple: Implement a parm that tells splitter not to trim the tiles to the polygon boundaries. Since splitter initially generates tiles which are aligned this might help. is implemented in the attached patch. You have to add parm --no-trim-to-polygon to activate this. The binary is available here: http://files.mkgmap.org.uk/download/90/splitter.jar Gerd > > In the archives I found this rule: > #The numbers used in areas.list are in Garmin units. To get from > #latitude and longitude in degrees to Garmin units multiply by 46603 > #which, incidentally, is (2^24)/360. > #To avoid overlap you have to make sure that the Garmin units are exactly > #divisable by 2048. > > > > Gerd wrote: > > If you use a simple polygon with spitter (e.g. a rectangle), it will > > fit the > > tiles > > into the polygon. If I got that right you use multiple splitter > > passes, each > > with > > a single polygon area. Later you try to combines the tiles to one map. > > You should instead run splitter with a polygon that contains the > > complete > > area. > > If that doesn't help, please post the polygon files and the splitter > > parms > > that you use. > > > > Gerd > > > > > > > > > > -- > > View this message in context: > > http://gis.19327.n5.nabble.com/issues-with-tile-boundaries-tp5753275p5753289.html > > Sent from the Mkgmap Development mailing list archive at Nabble.com. > > _______________________________________________ > > mkgmap-dev mailing list > > mkgmap-dev at lists.mkgmap.org.uk > > http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20130316/a60ec73a/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: no_trim_to_polygon_v1.patch Type: application/octet-stream Size: 4697 bytes Desc: not available Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20130316/a60ec73a/attachment-0001.obj
- Previous message: [mkgmap-dev] issues with tile boundaries
- Next message: [mkgmap-dev] issues with tile boundaries
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list