logo separator

[mkgmap-dev] leading and trailing spaces

From Paco Tyson paco.tyson at free.fr on Thu Jan 29 07:44:42 GMT 2015

Hi Mike,

I agree with you, there's no need for leading and trailing spaces.
An alternative way is to fix the OSM data. FYI, we can use the Osmose QA tool that detects those errors : 
http://osmose.openstreetmap.fr/en/errors/?item=5010&class=903

I try to periodically tidy the zones I'm mapping with this tool.

Cheers,
Paco

Le 29 janv. 2015 à 01:16, Mike Baggaley <mike at tvage.co.uk> a écrit :

> Good evening all,
> 
> I've noticed that there are a number of unwanted leading and trailing spaces
> in OSM data. You can get a list of the ones on the name field using the
> following:
> 
> name~'.* ' {echotags "name ends with a space"}
> name~' .*' {echotags "name starts with a space"}
> 
> I can't see any facility in mkgmap to remove these, and was wondering
> whether the best way would be simply to code them out by replacing the
> following line in parseDense, parseNodes, ParseWays and parseRelations:
> 
> String val = getStringById(...);
> 
> With
> 
> String val = getStringById(...).trim();
> 
> I can't think of any reason why a value would need to start or end with a
> space, so it seems reasonable to just remove them. Are there any other
> suggestions, or reasons why this should not be done?
> 
> Regards,
> Mike
> 
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev



More information about the mkgmap-dev mailing list