<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Mike,<br><br>I'd prefer a patch that changes the behaviour also for xml and o5m input,<br>not just for *.pbf. Maybe you find a place where this can be done once for<br>all sources?<br><br>Gerd<br><br><div>From: mike@tvage.co.uk<br>To: mkgmap-dev@lists.mkgmap.org.uk<br>Date: Thu, 29 Jan 2015 12:10:40 +0000<br>Subject: Re: [mkgmap-dev] leading and trailing spaces<br><br><pre>Hi Gerd, you are right; trim() removes all leading and trailing characters<br>that are less than 0x20. However, the place I mention is reading the raw OSM<br>data before any styles have been applied, so this should not be a problem.<br> <br>I agree with Paco that ideally the OSM data should be corrected, but that<br>will always be playing catch up, so I think it is best to also remove them<br>in the mkgmap processing. I have corrected a number of local ones in OSM,<br>but there are too many to correct them all manually.<br> <br>I've attached a patch that seems to be OK to me. Please give it a try.<br> <br>Regards,<br>Mike<br> <br>-----Original Message-----<br>From: GerdP [mailto:gpetermann_muenchen@hotmail.com] <br>Sent: 29 January 2015 06:18<br>To: mkgmap-dev@lists.mkgmap.org.uk<br>Subject: Re: [mkgmap-dev] leading and trailing spaces<br> <br>Hi Mike,<br> <br>I can't find it now, but I seem to remember a comment that<br>trim() should be used with great care as it removes the highway shield<br>codes.<br> <br>Gerd<br> <br> <br>Mike Baggaley wrote<br>> Good evening all,<br>> <br>> I've noticed that there are a number of unwanted leading and trailing<br>> spaces<br>> in OSM data. You can get a list of the ones on the name field using the<br>> following:<br>> <br>> name~'.* ' {echotags "name ends with a space"}<br>> name~' .*' {echotags "name starts with a space"}<br>> <br>> I can't see any facility in mkgmap to remove these, and was wondering<br>> whether the best way would be simply to code them out by replacing the<br>> following line in parseDense, parseNodes, ParseWays and parseRelations:<br>> <br>> String val = getStringById(...);<br>> <br>> With<br>> <br>> String val = getStringById(...).trim();<br>> <br>> I can't think of any reason why a value would need to start or end with a<br>> space, so it seems reasonable to just remove them. Are there any other<br>> suggestions, or reasons why this should not be done?<br>> <br>> Regards,<br>> Mike<br>> <br>> _______________________________________________<br>> mkgmap-dev mailing list<br> <br>> mkgmap-dev@.org<br> <br>> <a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br> <br> <br> <br> <br> <br>--<br>View this message in context:<br><a href="http://gis.19327.n5.nabble.com/leading-and-trailing-spaces-tp5831778p5831782" target="_blank">http://gis.19327.n5.nabble.com/leading-and-trailing-spaces-tp5831778p5831782</a><br>.html<br>Sent from the Mkgmap Development mailing list archive at Nabble.com.<br> <br></pre><br>_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</div>                                            </div></body>
</html>