[PATCH v1] - round coordinates when zoomed out

Having filled some gaps with that last little patch, I was wondering why I still had quite a few gaps when zoomed out. Obviously, the coords weren't being rounded to nearest given the zoom level. So, the attached patch does that rounding and, lo and behold, even more gaps have disappeared. Please give it a go, especially for maps that cross the equator/day line where the coords flip signs. Sure to be buggy but it's looking quite promising. BTW - this patch does not contain the last patch but they probably should be used together. Mark

Mark Burton wrote:
Having filled some gaps with that last little patch, I was wondering why I still had quite a few gaps when zoomed out. Obviously, the coords weren't being rounded to nearest given the zoom level. So, the attached patch does that rounding and, lo and behold, even more gaps have disappeared.
Please give it a go, especially for maps that cross the equator/day line where the coords flip signs. Sure to be buggy but it's looking quite promising.
BTW - this patch does not contain the last patch but they probably should be used together.
Mark
The first patch works great, without any negative side effects. As for this one (the second), I have many display problems related to it. I must say I prefer only the first patch. Mind this is using "lowest detail" in Mapsource, so errors are much more profound and easy to spot - they are present on medium detail too however. There are still a very few holes with both patches - though using only the first patch it is a great improvement compared to before. The above patch only brings benefit from resolution 17 onwards for me. 18,19,20,22 I prefer without. Problems are the same whether using Mapsource 6.13.7 or 6.15.7. "Double Roads" - though in reality it is only one - this is a real no-go for me: - also see the distortion of the primary (yellow) on the top. with first patch only: crippled road (this problem is less apparent in Mapsource 6.15.7 due to antialising): using first patch only.
------------------------------------------------------------------------
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Felix, Many thanks for taking the time to try that patch. Your results are interesting because I don't see those issues with the maps I am testing. So, please tell me for the examples you sent, what mapsource zoom level are those images shown at (i.e. what is the scale distance in the corner of the image) and also what is the OSM URL for the second location (B18 + railway) because I haven't been able to locate that one. Cheers, Mark

Mark Burton wrote:
Hi Felix,
Many thanks for taking the time to try that patch.
Your results are interesting because I don't see those issues with the maps I am testing.
So, please tell me for the examples you sent, what mapsource zoom level are those images shown at (i.e. what is the scale distance in the corner of the image) and also what is the OSM URL for the second location (B18 + railway) because I haven't been able to locate that one.
Cheers,
Mark
Well I just discovered that my decreasing of douglas peucker algorithm from 2.6 to 1.3 might have been responsible. I just kicked that out (using only your fill-line patch) and fewer holes than before. I will try again the round coordinates patch without my changes to douglas peucker algorithm. Attached the douglas peucker filter patch that I had been using, maybe they were responsible for the problems? Actually using Filter_Distance = 5.4: could be working even better - the straighter the line - the less holes (I just don't know whether 5.4 wouldn't be so much, that when using your GPS far zoomed out you have the problem of driving besides the street instead of on the street (like when using the GPS inbuilt basemap). The other reason could be that the "double line" is defined via typfile to be out of center Index: src/uk/me/parabola/mkgmap/build/MapBuilder.java =================================================================== --- src/uk/me/parabola/mkgmap/build/MapBuilder.java (revision 1379) +++ src/uk/me/parabola/mkgmap/build/MapBuilder.java (working copy) @@ -110,7 +110,7 @@ private boolean poiAddresses = true; private int poiDisplayFlags; private boolean sortRoads = true; - private static final double FILTER_DISTANCE = 2.6; + private static final double FILTER_DISTANCE = 1.3; private boolean enableLineCleanFilters = true; private boolean makePOIIndex = false; private int routeCenterBoundaryType = 0; Index: src/uk/me/parabola/mkgmap/osmstyle/ActionRule.java
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Mark Burton wrote:
Hi Felix,
Many thanks for taking the time to try that patch.
Your results are interesting because I don't see those issues with the maps I am testing.
So, please tell me for the examples you sent, what mapsource zoom level are those images shown at (i.e. what is the scale distance in the corner of the image) and also what is the OSM URL for the second location (B18 + railway) because I haven't been able to locate that one.
Cheers,
Mark
okay, follow up. The double lines feature is really strange. It happens on the Alps file, but not on Austria file. As I can only spot one big error, I think it is acceptable. As for the second picture, it's all about the douglas peucker filter distance. Actually I think 5.4 is the way to go (now that holes are filled). 2.6 was enough for the crippled roads to mostly disappear (5.4 still looks nicer). Using filter distance 1.3 many of those problems will appear. Permalink for that area: http://www.openstreetmap.org/?lat=47.942&lon=16.182&zoom=13&layers=B000FTF
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On Nov 17, 2009, at 1:26, Mark Burton wrote:
Please give it a go, especially for maps that cross the equator/day line where the coords flip signs. Sure to be buggy but it's looking quite promising.
I tried this out, along with the previous patch, and so far everything seems to be fine. My map does not cross the Equator or the Prime Meridian though, so this is not a comprehensive test. Thanks!

Hi Clinton,
I tried this out, along with the previous patch, and so far everything seems to be fine. My map does not cross the Equator or the Prime Meridian though, so this is not a comprehensive test.
Thanks for trying it out. If no one reports anything bad, I think it's worth committing. Cheers, Mark
participants (3)
-
Clinton Gladstone
-
Felix Hartmann
-
Mark Burton