logo separator

[mkgmap-dev] Commit: r1566: Drop all tags from the osm file that are not used

From WanMil wmgcnfg at web.de on Fri Feb 12 21:00:20 GMT 2010

> On Thu, Feb 11, 2010 at 07:59:01PM +0100, WanMil wrote:
>> The Osm5XMLHandler sometimes throw a NullPointerException in line 397.
>> This is the key.equals("highway") part:
>>
>> if((val.equals("motorway_junction") ||
>> 	val.equals("services"))&&
>> 	key.equals("highway"))
>> {
>> 	exits.add(currentNode);
>> 	currentNode.addTag("osm:id", "" + currentElementId);
>> }
>>
>> It might be fixed by changing it to "highway".equals(key).
>
> Right, java.lang.Object.equals(Object other) specifically says that you can
> pass other=null and the result will be false.  On the other hand, invoking
> a method on a null reference will throw a NullPointerException.
>
> 	Marko

After the commit it's working!
The speed improvements are great (I usually create maps using only very 
few tags).

WanMil



More information about the mkgmap-dev mailing list