Hi Mike,

the style cannot create a way, but it can add multiple routable ways for one 
OSM way.
Use "continue" or "continue with actions" for that.

The comment is a bit misleading and I think the code for "old-style" is now 
obsolete as well.

Gerd


From: [email protected]
To: [email protected]
Date: Wed, 4 Mar 2015 16:01:56 +0000
Subject: Re: [mkgmap-dev] --make-opposite-cycleways option

Hi Gerd, I was not clear what you meant by change the style to produce the same 
result, so I provided a change to the style that with the code changes produces 
the same result as now. Unless a style can create an extra way, I can’t see how 
a style can be set up to allow cycling in both directions, but other traffic 
only in one direction without using the extra way created by the 
--make-opposite-cycleways code. Can a style create a way? I got the list of 
tags to delete from the following code which suggested that the following lines 
were all access tags (plus a few tags mentioned elsewhere that I also 
included):                 public boolean init(ElementSaver saver, 
EnhancedProperties props) {                                                     
           if (props.getProperty("old-style", false)) {                         
                       // the access tags need to be loaded if the old style 
handling                                                // is active and access 
restrictions are handled by the java                                            
    // source code and not by the style                                         
       usedTags.add("access");                                                
usedTags.add("bicycle");                                                
usedTags.add("carpool");                                                
usedTags.add("delivery");                                                
usedTags.add("emergency");                                                
usedTags.add("foot");                                                
usedTags.add("goods");                                                
usedTags.add("hgv");                                                
usedTags.add("motorcar");                                                
usedTags.add("motorcycle");                                                
usedTags.add("psv");                                                
usedTags.add("route");                                                
usedTags.add("taxi");                                } I gather that route is 
not an access tag, so I agree that it should not be included. Regards,Mike 
From: Gerd Petermann [mailto:[email protected]] 
Sent: 04 March 2015 05:31
To: [email protected]
Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike,

as I said, I'd be more happy to have a patch that remove's the option
and shows how to change the default style instead to get the same result 
as with your patch.

Your patch tries to remove all kinds of tags which might lead to wrong
routing:
+        cycleWay.deleteTag("vehicle");
+        cycleWay.deleteTag("motor_vehicle");
+        cycleWay.deleteTag("carpool");
+        cycleWay.deleteTag("delivery");
+        cycleWay.deleteTag("emergency");
+        cycleWay.deleteTag("foot");
+        cycleWay.deleteTag("goods");
+        cycleWay.deleteTag("hgv");
+        cycleWay.deleteTag("motorcar");
+        cycleWay.deleteTag("motorcycle");
+        cycleWay.deleteTag("psv");
+        cycleWay.deleteTag("route");
+        cycleWay.deleteTag("taxi");
+        cycleWay.deleteTag("bus");
+        cycleWay.deleteTag("truck"); 

Please explain why you remove route=* .
I think that one should be kept.

GerdFrom: [email protected]
To: [email protected]
Date: Tue, 3 Mar 2015 19:45:00 +0000
Subject: Re: [mkgmap-dev] --make-opposite-cycleways optionHI Gerd, the attached 
updated patch adds a line to the default style that can be uncommented if you 
want to see the opposite cycleway names as they are currently. Regards,Mike 
From: Gerd Petermann [mailto:[email protected]] 
Sent: 03 March 2015 08:26
To: [email protected]
Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike,

I think you are right  regarding the access tags.
The current solution in combination with the default style
might route a truck through the wrong direction of a oneway.
Thanks for pointing this out.

If I got it right, most style developers don't use this option,
they prefer to have the logic in the rules.
Maybe this is another argument to remove the option
instead of adding code to make it work in special cases?

Is anybody able to change the default style so that it produces
the same result ?

GerdFrom: [email protected]
To: [email protected]
Date: Mon, 2 Mar 2015 22:46:07 +0000
Subject: [mkgmap-dev] --make-opposite-cycleways optionDear all,
 
When using the --make-opposite-cycleways option, I notice that the address
index adds a road name of the actual road name suffixed with " (cycleway)".
For me at least, this is undesirable. Also the generated name does not
conform to the OSM naming convention of not including any descriptive
information in names. I therefore propose that the name of an opposite
cycleway be set to the same as the original road name, and that users who
want to name the opposite cycleway differently should use the style file to
rename it.
 
In looking at the code that produces the opposite cycleway, I also believe
there is an error in the way it handles access tags - the code currently
sets access=no, bicycle=yes and foot=no, but ignores all other access tags.
Hence if (for example) the road has psv=yes on it, the generated cycleway
will also have psv=yes (unless I am misunderstanding something in the
handling of access tags). 
 
I therefore submit the attached patch for trial.
 
Regards,
Mike
_______________________________________________ mkgmap-dev mailing list 
[email protected] 
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list 
[email protected] 
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev                            
          
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to