logo separator

[mkgmap-dev] builtin-tag-list

From GerdP gpetermann_muenchen at hotmail.com on Wed Apr 24 19:08:14 BST 2013

Hi WanMil,

ok, so I think I should remove the builtin-tag-list and implement a
getUsedTags() method in StyledConverter. This would then also allow to
remove the RoutingHook. 

OK?

Gerd


WanMil wrote
>> Hi programmers,
> 
> Hi Gerd,
> 
>>
>> while looking at the name-tag-list option I wondered again why we have
>> so many different ways to maintain the "usedTags" HashMap which is
>> finally
>> used to filter OSM data in class OsmHandler.
>>
>> 1)We have a list coded in /resources/styles/builtin-tag-list. The tags
>> listed here
>> can be found in the java sources, but not all tags used in the sources
>> are
>> listed.
> 
> This is historical. This was the initial list where all tags used in the 
> sources must be configured. This has the impact that the tag list is 
> static and does not reflect which options are used. So it's sometimes 
> larger than required which has a performance impact.
> 
>>
>> 2) Some sources use hard coded tag names and they have a method
>> getUsedTags()
>> to tell this fact to other routines.
> 
> These are the OsmReadingHook classes. They use a getUsedTags() method. 
> These classes are called after reading the OSM file and before the style 
> is applied.
> 
>>
>> 3) Some hard coded tags are used in StyledConverter but they are added to
>> the map
>> in the RoutingHook, e.g. "access", "highway".
> 
> This is a workaround to remove the tags from the builtin-tag-list 
> without modifying too much code. So if routing is enabled the routing 
> hook adds the tags required for routing. But these tags are not 
> evaluated by the RoutingHook itself but by the StyledConverter which has 
> no getUsedTags() method.
> 
> Things are more complicate:
> The LinkDestinationHook evaluates some tags like "destination" but it 
> does not return any of them in the getUsedTags() method. The reason is 
> that it must evaluate the tags only if they are used in the style file. 
> If destination is not referenced by the style file it makes no sense to 
> evaluate destination in the LinkDestinationHook so there is no need to 
> read the tag from the OSM file.
> 
>>
>> I'd prefer to have a common way to keep the map up to date, and I think
>> that
>> the best
>> solution is to add the tag names in the source where they are used (and
>> if
>> they are used).
> 
> At the moment I know about three ways:
> 1. builtin-tag-list
> 2. the getUsedTags() method of the OsmReadingHooks classes
> 3. referencing in the style file
> 
> I think the most you can achieve is to get rid of the builtin-tag-list. 
> In the past I have removed lots of tags here by implementing an 
> OsmReadingHook. Maybe some code can be moved from the StyledConverter to 
> a better place which also implements the getUsedTags() method.
> 
>>
>> What was the idea behind the builtin-tag-list ?
> 
> See above. This was the first way to define tags that are used within 
> the code.
> 
>>
>> Gerd
>>
> 
> WanMil
> 
> _______________________________________________
> mkgmap-dev mailing list

> mkgmap-dev at .org

> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev





--
View this message in context: http://gis.19327.n5.nabble.com/builtin-tag-list-tp5758284p5758387.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.


More information about the mkgmap-dev mailing list