I want to remove all tags that are not necessarily needed but are still remaining in the builtin-tag-list.

From my point of view the following tags can be removed:

day_off
day_on
hour_off
hour_on
=> They are only used in the RestricationRelation class to warn the user that these tags are not supported.

addr:phone
openGeoDB:sort_name
=> they are not referenced by any java class

natural
=> only accessed by the SeaGenerator and that adds the tag dynamically

osm:id?
=> It is added by the HighwayHook but does it really exists in the source data?

barrier
cycleway
fixme
FIXME
=> only accessed by the HighwayHooks and are added dynamically using the attached patch


WanMil
Index: resources/styles/builtin-tag-list
===================================================================
--- resources/styles/builtin-tag-list	(revision 1912)
+++ resources/styles/builtin-tag-list	(working copy)
@@ -15,12 +15,8 @@
 addr:phone
 addr:postcode
 addr:street
-barrier
 bicycle
 carpool
-cycleway
-day_off
-day_on
 delivery
 display_name
 emergency
@@ -29,13 +25,9 @@
 exit:facility
 exit:road_ref
 exit:to
-fixme
-FIXME
 foot
 goods
 hgv
-hour_off
-hour_on
 int_ref
 is_in
 is_in:country
@@ -47,10 +39,8 @@
 motorcycle
 name
 nat_ref
-natural
 oneway
 openGeoDB:postal_codes
-openGeoDB:sort_name
 osm:id
 phone
 psv
Index: src/uk/me/parabola/mkgmap/reader/osm/HighwayHooks.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/HighwayHooks.java	(revision 1912)
+++ src/uk/me/parabola/mkgmap/reader/osm/HighwayHooks.java	(working copy)
@@ -13,7 +13,9 @@
 package uk.me.parabola.mkgmap.reader.osm;
 
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import uk.me.parabola.imgfmt.app.Coord;
 import uk.me.parabola.imgfmt.app.Exit;
@@ -42,6 +44,8 @@
 
 	private Node currentNodeInWay;
 
+
+
 	public boolean init(ElementSaver saver, EnhancedProperties props) {
 		this.saver = saver;
 		if(props.getProperty("make-all-cycleways", false)) {
@@ -55,9 +59,40 @@
 		linkPOIsToWays = props.getProperty("link-pois-to-ways", false);
 		currentNodeInWay = null;
 
+		if (makeCycleways || makeOppositeCycleways) {
+			// need the additional two tags 
+			usedTags.add("cycleway");
+			usedTags.add("bicycle");
+		}
+		
 		return true;
 	}
+	
+	private final Set<String> usedTags = new HashSet<String>() {
+		{
+			add("highway");
+			add("access");
+			add("barrier");
+		    add("FIXME");
+		    add("fixme");
+		    add("route");
+		    add("oneway");
+		    add("junction");
+		    add("name");
+		    add(Exit.TAG_ROAD_REF);
+		    add("ref");
+		    
+// the following two tags are only added if the cycleway options are set 
+//		    add("cycleway");
+//		    add("bicycle");
 
+		}
+	};
+	
+	public Set<String> getUsedTags() {
+		return usedTags;
+	}
+	
 	public void onAddNode(Node node) {
 		String val = node.getTag("highway");
 		if (val != null && (val.equals("motorway_junction") || val.equals("services"))) {
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to