<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
not an idea - but a comment. I think that for such a special
nonusual case, there should be no degradation for the general use.
Wouldn't it be enough to just switch off douglas peucker algo for
maps where you want to include long "straigt" lines?<br>
<div class="moz-cite-prefix">On 25.07.2014 10:46, Gerd Petermann
wrote:<br>
</div>
<blockquote cite="mid:DUB112-W68D46B916FBD9CF28D9D249EFC0@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi Roger,<br>
<br>
the problem is caused by the routine that removes obsolete
points from straigt lines. <br>
This routine doesn't care (enough) about the spherical
distortian.<br>
The routine uses herons formula to "calculate distance of point
in the middle to line c1,c2".<br>
This formula is for 2D, but used to work good enough with the
rather short ways <br>
we have in OSM. (The formula is also used in the Douglas-Peucker
filter).<br>
With long lines the as in your data, the errors are too big and
the routine returns garbage.<br>
<br>
If I got that right, we have to use the formula for the
"Cross-track distance" as described here:<br>
<a class="moz-txt-link-freetext" href="http://www.movable-type.co.uk/scripts/latlong.html">http://www.movable-type.co.uk/scripts/latlong.html</a><br>
<br>
Unfortunately, this routine uses more trigonometrical
calculations, so it will be slower.<br>
<br>
@Programmers: Any other ideas?<br>
<br>
Gerd<br>
<br>
<div>
<hr id="stopSpelling">Date: Wed, 25 Jun 2014 12:12:18 +0100<br>
From: <a class="moz-txt-link-abbreviated" href="mailto:roger@rogercalvert.me.uk">roger@rogercalvert.me.uk</a><br>
To: <a class="moz-txt-link-abbreviated" href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a><br>
Subject: [mkgmap-dev] Incorrect compilation of grid lines<br>
<br>
I have a file containing the British National Grid lines, as
printed on Ordnance Survey maps. This can be found at <a
moz-do-not-send="true"
href="http://www.rogercalvert.me.uk/osm/GBGrid/GBGrid.zip"
target="_blank">http://www.rogercalvert.me.uk/osm/GBGrid/GBGrid.zip</a>
(this contains two files, they are the same except for the
addition of the 'version' tag in the GBGrid06.osm file). I
compile this file with mkgmap and overlay it on my GPS map.<br>
<br>
This works correctly with mkgmap 2654 and It displays
correctly in JOSM.<br>
<br>
With mkgmap version 3241, the lines are misaligned and out of
position. The behaviour is the same on MapSource, BaseCamp and
my device. No error messages are produced.<br>
<br>
(I have not used any versions of mkgmap in between these two).
<br>
<br>
My style file allocates codes in the 0x10300 range to these
lines, but the effect is the same when I use code 0x21
(contour) for all lines.<br>
<br>
Attached are screen dumps for a small part of the map, from
JOSM, mkgmap 2654 and mkgmap 3241, and also the batch file I
used to compile it.<br>
<br>
I would greatly appreciate any advice.<br>
<br>
Many thanks,<br>
<br>
Roger<br>
<div class="ecxmoz-signature">-- <br>
<hr style="width:50%;"><br>
Roger Calvert<br>
<a moz-do-not-send="true"
href="http://www.rogercalvert.me.uk" target="_blank">http://www.rogercalvert.me.uk</a><br>
<hr style="width:50%;"></div>
<br>
_______________________________________________
mkgmap-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a>
<a class="moz-txt-link-freetext" href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
mkgmap-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a>
<a class="moz-txt-link-freetext" href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
keep on biking and discovering new trails
Felix
openmtbmap.org & <a class="moz-txt-link-abbreviated" href="http://www.velomap.org">www.velomap.org</a></pre>
</body>
</html>