roadspeed in default style

Hi, one of threads reminded me about "roadspeed" include in default style. As far as I understand, Garmin maps made by mkgmap contain average road speed, which can be used for calculation of arrival time. Include "roadspeed" deals with speed limits and convert them into value, which is then treated as average speed. In my opinion this is wrong assumption. Better average speed could be estimated from road type. Speed limit should be used only to limit average speed, for example on good roads in urban area. I'm using this approach in my maps. I have attached my alternative for roadspeed. -- Best regards, Andrzej

Hi Andrzej, I think that you are right, but I have not thought about this in detail. I see that Ralf Kleineisel and Bernd are using the rules from the default style. What do you think about Andrzejs version? Gerd Date: Sun, 8 Mar 2015 16:43:20 +0100 From: popej@poczta.onet.pl To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] roadspeed in default style Hi, one of threads reminded me about "roadspeed" include in default style. As far as I understand, Garmin maps made by mkgmap contain average road speed, which can be used for calculation of arrival time. Include "roadspeed" deals with speed limits and convert them into value, which is then treated as average speed. In my opinion this is wrong assumption. Better average speed could be estimated from road type. Speed limit should be used only to limit average speed, for example on good roads in urban area. I'm using this approach in my maps. I have attached my alternative for roadspeed. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

I have also often proposed this - already long time ago. It's the most usable way. maxspeed should only make a road slower, never faster. Because it would be an illusion to drive 100km/h on a highway=track - even if it were allowed - to give an extreme example. As long as there is not tag giving average speed - which could be used to overturn the actual roadspeed - maxspeed should be like in real life, a limit only - never allowed to increase the roadspeed - Andrzejs version therefore makes perfect sense. On 12.03.2015 08:31, Gerd Petermann wrote:
Hi Andrzej,
I think that you are right, but I have not thought about this in detail.
I see that Ralf Kleineisel and Bernd are using the rules from the default style. What do you think about Andrzejs version?
Gerd
Date: Sun, 8 Mar 2015 16:43:20 +0100 From: popej@poczta.onet.pl To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] roadspeed in default style
Hi,
one of threads reminded me about "roadspeed" include in default style.
As far as I understand, Garmin maps made by mkgmap contain average road speed, which can be used for calculation of arrival time.
Include "roadspeed" deals with speed limits and convert them into value, which is then treated as average speed. In my opinion this is wrong assumption. Better average speed could be estimated from road type. Speed limit should be used only to limit average speed, for example on good roads in urban area. I'm using this approach in my maps. I have attached my alternative for roadspeed.
-- Best regards, Andrzej
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org

Am Donnerstag, 12. März 2015, 08:31:30 schrieb Gerd Petermann:
What do you think about Andrzejs version?
Hi Gerd I don't see any problem with Andrzej's speed rules, i will test them asap The only thing is, maxspeed=DE:rural is used only on 95 ways in Germany http://overpass-turbo.eu/s/89m so it seems to me, that this is a more or less useless rule. maxspeed=RO:urban is used more then 150000 times, this should be added, if someone knows the correct speed limit http://taginfo.openstreetmap.org/tags/maxspeed=RO%3Aurban Bernd -- amarok2 now playing:

Hi all, for maxspeed=<countrycode>:<zone type> I found this link http://wiki.openstreetmap.org/wiki/Speed_limits in the wiki: http://wiki.openstreetmap.org/wiki/Key%3Amaxspeed Gerd Bernd Weigelt wrote
Am Donnerstag, 12. März 2015, 08:31:30 schrieb Gerd Petermann:
What do you think about Andrzejs version?
Hi Gerd
I don't see any problem with Andrzej's speed rules, i will test them asap
The only thing is, maxspeed=DE:rural is used only on 95 ways in Germany http://overpass-turbo.eu/s/89m so it seems to me, that this is a more or less useless rule.
maxspeed=RO:urban is used more then 150000 times, this should be added, if someone knows the correct speed limit http://taginfo.openstreetmap.org/tags/maxspeed=RO%3Aurban
Bernd
-- amarok2 now playing:
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/roadspeed-in-default-style-tp5836280p5836901.... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Am Donnerstag, 12. März 2015, 19:21:42 schrieb Bernd Weigelt:
I don't see any problem with Andrzej's speed rules, i will test them asap
Hmmh, but i have some questions Example a motorway in Germany, tagged with maxspeed=none maxspeed=none { set maxspeed=140 } ok, i unterstand what this rule does maxspeed~'.*:motorway' { set maxspeed=130 } now decrease the maxspeed to 130 kmh ok, but if there is no speed limit not useful first question, what should this rule do? maxspeed=* & maxspeedkmh()!=* { delete maxspeed } back to the example maxspeed=130 *and* maxspeedkmh() *and* mkgmap:road-speed-max not set my motorway stays in between this rules, IMHO it should be set to mkgmap:road-speed-max = 7 or mkgmap:road-speed = 7 maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 120 { set mkgmap:road-speed='-0'; set mkgmap:road-speed-max = 6 } maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() != * { set mkgmap:road-speed='-0'; set mkgmap:road-speed-max = 7 } the last rules should be maxspeed up to 120 kmh maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 120 { set mkgmap:road-speed='-0'; set mkgmap:road-speed-max = 6 } maxspeed higher then 120 kmh maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 120 { set mkgmap:road-speed-class = 7 } maybe i'm wrong Bernd -- amarok2 now playing: artist: Elvis Presley title: Bridge Over Troubled Water album: Viva Las Vegas

Am Donnerstag, 12. März 2015, 20:46:28 schrieben Sie
maxspeed~'.*:motorway' { set maxspeed=130 } now decrease the maxspeed to 130 kmh
Oops, this rule isn't used in my example the example stays at 140 km/h Bernd -- amarok2 now playing: artist: Sarah Brightman title: Pie Jesu album: Diva The Singles Collection

Bernd Weigelt <weigelt.bernd@web.de> writes:
Am Donnerstag, 12. März 2015, 19:21:42 schrieb Bernd Weigelt:
I don't see any problem with Andrzej's speed rules, i will test them asap
Hmmh, but i have some questions
Example a motorway in Germany, tagged with maxspeed=none
maxspeed=none { set maxspeed=140 } ok, i unterstand what this rule does
I guess the trick is to figure out how to map the rules and other tags to what speeds are reasonable to assume. This seems like a place where a tag that indicates typical speed would be useful; locals can set it to what speeds most traffic is normally at, which is really what routing wants to know. But assuming unlimited motorways are 130 or 140 does not sound crazy to me; uncongested Interstates in low-enforcement US states are like that.

It does not matter whether it's unlimited, 200, 140 or 130... It all translates to road-speed=7 which is the highest level that we can give (which in itself is something like 115-130 depending on your GPS device/Basecamp/Mapsource). There is no real unlimited maxspeed in garmin maps (except for the new map format - which mkgmap cannot write anyhow). On 12 March 2015 at 21:38, Greg Troxel <gdt@ir.bbn.com> wrote:
Bernd Weigelt <weigelt.bernd@web.de> writes:
Am Donnerstag, 12. März 2015, 19:21:42 schrieb Bernd Weigelt:
I don't see any problem with Andrzej's speed rules, i will test them asap
Hmmh, but i have some questions
Example a motorway in Germany, tagged with maxspeed=none
maxspeed=none { set maxspeed=140 } ok, i unterstand what this rule does
I guess the trick is to figure out how to map the rules and other tags to what speeds are reasonable to assume. This seems like a place where a tag that indicates typical speed would be useful; locals can set it to what speeds most traffic is normally at, which is really what routing wants to know.
But assuming unlimited motorways are 130 or 140 does not sound crazy to me; uncongested Interstates in low-enforcement US states are like that.
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- Felix Hartman - Openmtbmap.org & VeloMap.org Floragasse 9/11 1040 Wien Austria - Österreich

Oh - the only thing could be if maxspeed=none is used in places where the limit is actually lower than 120.. AND if it's a motorway or in some countries a highway=trunk (cause on no higwhay=primary such a limit would be in general speaking drivable). So the question is - does this actually happen in the database? Are there countries where maxspeed=none is entered for roads where 100 is the real practical limit? In that case of course we would need a country list to set maxspeed=none to road_speed=6 or 5. On 13 March 2015 at 12:31, Felix Hartmann <extremecarver@gmail.com> wrote:
It does not matter whether it's unlimited, 200, 140 or 130... It all translates to road-speed=7 which is the highest level that we can give (which in itself is something like 115-130 depending on your GPS device/Basecamp/Mapsource). There is no real unlimited maxspeed in garmin maps (except for the new map format - which mkgmap cannot write anyhow).
On 12 March 2015 at 21:38, Greg Troxel <gdt@ir.bbn.com> wrote:
Bernd Weigelt <weigelt.bernd@web.de> writes:
Am Donnerstag, 12. März 2015, 19:21:42 schrieb Bernd Weigelt:
I don't see any problem with Andrzej's speed rules, i will test them asap
Hmmh, but i have some questions
Example a motorway in Germany, tagged with maxspeed=none
maxspeed=none { set maxspeed=140 } ok, i unterstand what this rule does
I guess the trick is to figure out how to map the rules and other tags to what speeds are reasonable to assume. This seems like a place where a tag that indicates typical speed would be useful; locals can set it to what speeds most traffic is normally at, which is really what routing wants to know.
But assuming unlimited motorways are 130 or 140 does not sound crazy to me; uncongested Interstates in low-enforcement US states are like that.
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- Felix Hartman - Openmtbmap.org & VeloMap.org Floragasse 9/11 1040 Wien Austria - Österreich
-- Felix Hartman - Openmtbmap.org & VeloMap.org Floragasse 9/11 1040 Wien Austria - Österreich

Hi i think, the motorways with maxspeed=none in every country should have road_speed=7, because it prefere to use them, But with Andrzej's proposal streets with a maxspeed higher then 120 kmh got no mkgmap:road-speed-class. It's possible, that i'm wrong, but with a { echotags " " ; ...} in the last line i got no output, but i have a lot of motorways with maxspeed=none in my neighbourhood http://overpass-turbo.eu/s/8aj Bernd Am Freitag, 13. März 2015, 12:35:31 schrieb Felix Hartmann:
In that case of course we would need a country list to set maxspeed=none to road_speed=6 or 5.
-- amarok2 now playing: artist: Sinéad O'Connor title: Famine album: Universal Mother

Hi Bernd,
first question, what should this rule do? maxspeed=* & maxspeedkmh()!=* { delete maxspeed }
This rule deletes tag "maxspeed" if we can't assign a numeric value to it.
the last rules should be maxspeed up to 120 kmh maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 120 { set mkgmap:road-speed='-0'; set mkgmap:road-speed-max = 6 }
maxspeed higher then 120 kmh maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 120 { set mkgmap:road-speed-class = 7 }
mkgmap:road-speed-class isn't set anywhere in default style, except in current roadspeed include file. Condition mkgmap:road-speed-class!=* would be false, maybe you wanted to put mkgmap:road-speed-max there?. Setting value for mkgmap:road-speed-class is what I want to avoid in my include. Setting mkgmap:road-speed-max=7 doesn't limit anything either, could be omitted. The reason for setting mkgmap:road-speed='-0' is to clear any existing value, but maybe this is superfluous. -- Best regards, Andrzej

Am Freitag, 13. März 2015, 14:08:45 schrieb Andrzej Popowski: Hi
Hi Bernd,
first question, what should this rule do? maxspeed=* & maxspeedkmh()!=* { delete maxspeed }
This rule deletes tag "maxspeed" if we can't assign a numeric value to it.
got this answer a few hours ago while testing this against my style, it's clear now. btw, found many values like 30_mph with Taginfo, are they removed by this rule,too? IMHO they keeped, but rewritten to usable values
the last rules should be maxspeed up to 120 kmh maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 120 { set mkgmap:road-speed='-0'; set mkgmap:road-speed-max = 6 }
maxspeed higher then 120 kmh maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 120 { set mkgmap:road-speed-class = 7 }
mkgmap:road-speed-class isn't set anywhere in default style, except in current roadspeed include file. Condition mkgmap:road-speed-class!=* would be false, maybe you wanted to put mkgmap:road-speed-max there?.
i'm using the default rules in inc/roadspeed from the default style mkgmap:road-speed-max is IMHO not needed because '7' is the highest value, but i think your last rule ignores speed higher then 120 kmh maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() != * { set mkgmap:road-speed='-0'; set mkgmap:road-speed-max = 7 } mkgmap:road-speed-max = 7 is only set if maxspeedkmh() isn't set, but maxspeedkmh() couldn't be empty if the maxpeed value is numeric, so there is no possibilty to set a mkgmap:road-speed-max = 7 for streets with maxspeed higher then 120 kmh maybe this rule works as you expected, but it is a catch all, i don't like them ;-) maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() = * { set mkgmap:road-speed='-0'; set mkgmap:road-speed-max = 7 }
Setting value for mkgmap:road-speed-class is what I want to avoid in my include. Setting mkgmap:road-speed-max=7 doesn't limit anything either, could be omitted. The reason for setting mkgmap:road-speed='-0' is to clear any existing value, but maybe this is superfluous.
I think setting mkgmap:road-speed-class is only needed for the highest value, higher then 120 kmh mkgmap:road-speed='-0' didn't distube me much, but IMHO it's superfluous Sorry, i can't describe it better, my english isn't good enough. Bernd -- amarok2 now playing:

Am Freitag, 13. März 2015, 15:15:39 schrieb Bernd Weigelt: an example, if the rule is changed
maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() = * { echotags " "; set mkgmap:road-speed='-0'; set mkgmap:road-speed-max = 7 }
327395478 - [mkgmap:label:1=A57, highway=motorway, mkgmap:admin_level8=Neukirchen-Vluyn, mkgmap:cache_maxspeedkmh=140.0, mkgmap:admin_level6=Kreis Wesel, network=e-road, ref=A 57, int_ref=E 31, is_in=NRW, Germany, Europe, maxspeed=140, oneway=yes, mkgmap:admin_level2=DEU, mkgmap:postcode=47506, mkgmap:admin_level5=Regierungsbezirk Düsseldorf, mkgmap:admin_level4=Nordrhein-Westfalen] -- amarok2 now playing: artist: Ibizarre title: Las Brisas album: Café Del Mar, Volumen trece

Hi Bernd, not sure what you try to point out here. If you have an improved version of the roadspeed include, please post it. Gerd Bernd Weigelt wrote
Am Freitag, 13. März 2015, 15:15:39 schrieb Bernd Weigelt:
an example, if the rule is changed
maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() = * { echotags " "; set mkgmap:road-speed='-0'; set mkgmap:road-speed-max = 7 }
327395478 - [mkgmap:label:1=A57, highway=motorway, mkgmap:admin_level8=Neukirchen-Vluyn, mkgmap:cache_maxspeedkmh=140.0, mkgmap:admin_level6=Kreis Wesel, network=e-road, ref=A 57, int_ref=E 31, is_in=NRW, Germany, Europe, maxspeed=140, oneway=yes, mkgmap:admin_level2=DEU, mkgmap:postcode=47506, mkgmap:admin_level5=Regierungsbezirk Düsseldorf, mkgmap:admin_level4=Nordrhein-Westfalen]
-- amarok2 now playing: artist: Ibizarre title: Las Brisas album: Café Del Mar, Volumen trece
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/roadspeed-in-default-style-tp5836280p5837018.... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi all, don't know which version is better, but both contain some flaws: I think these two rules maxspeed~'.*:urban' { set maxspeed=50 } maxspeed~'.*:rural' { set maxspeed=90 } make it impossible that these 4 rules will ever fire: maxspeed=AT:rural { set maxspeed=100 } maxspeed=DE:rural { set maxspeed=100 } maxspeed=RU:urban { set maxspeed=60 } maxspeed=UA:urban { set maxspeed=60 } I suggest to use maxspeed~'.*:urban' & maxspeed!=RU:urban & maxspeed!=UA:urban { set maxspeed=50 } maxspeed~'.*:rural' & maxspeed!=AT:rural & maxspeed!=DE:rural { set maxspeed=90 } Gerd Bernd Weigelt wrote
Am Freitag, 13. März 2015, 10:24:38 schrieb GerdP:
please post it
see the attached file
Bernd -- amarok2 now playing: artist: Angélique Kidjo title: Salala album: Djin Djin
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
roadspeed (2K) <http://gis.19327.n5.nabble.com/attachment/5837023/0/roadspeed>
-- View this message in context: http://gis.19327.n5.nabble.com/roadspeed-in-default-style-tp5836280p5837027.... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Am Freitag, 13. März 2015, 10:59:56 schrieb GerdP:
maxspeed~'.*:urban' & maxspeed!=RU:urban & maxspeed!=UA:urban { set maxspeed=50 } maxspeed~'.*:rural' & maxspeed!=AT:rural & maxspeed!=DE:rural { set maxspeed=90 }
This leads to really long lines if we implement country specific rules, i propose mkgmap:country=BEL & highway=... { set ...} Bernd -- amarok2 now playing: artist: The B-52s title: Good Stuff album: Nude on the Moon

Hi Gerd,
I think these two rules maxspeed~'.*:urban' { set maxspeed=50 } maxspeed~'.*:rural' { set maxspeed=90 }
make it impossible that these 4 rules will ever fire: maxspeed=AT:rural { set maxspeed=100 } maxspeed=DE:rural { set maxspeed=100 } maxspeed=RU:urban { set maxspeed=60 } maxspeed=UA:urban { set maxspeed=60 }
Right, thanks Gerd. Should be reversed, specific countries first and catch all last: maxspeed=AT:rural { set maxspeed=100 } maxspeed=DE:rural { set maxspeed=100 } maxspeed~'.*:rural' { set maxspeed=90 } maxspeed=RU:urban { set maxspeed=60 } maxspeed=UA:urban { set maxspeed=60 } maxspeed~'.*:urban' { set maxspeed=50 } -- Best regards, Andrzej

Am Freitag, 13. März 2015, 19:44:45 schrieb Andrzej Popowski:
Right, thanks Gerd. Should be reversed, specific countries first and catch all last:
Didn't work, because maxspeed=DE:rural { set maxspeed=100 } is overwritten from maxspeed~'.*:rural' { set maxspeed=90 } At the moment i'm trying some rules based on mkgmap_country and more use of 'add' instead of #set' Bernd -- amarok2 now playing: artist: Wet Wet Wet title: Love Is All Around [Live At Adam Street] album: Greatest Hits

Hi Bernd, I think the attached version with the change proposed by Andrzej should work. The generic rules cannot fire when maxspeed is set to a numeric value. Gerd
From: weigelt.bernd@web.de To: mkgmap-dev@lists.mkgmap.org.uk Date: Fri, 13 Mar 2015 20:03:25 +0100 Subject: Re: [mkgmap-dev] roadspeed in default style
Am Freitag, 13. März 2015, 19:44:45 schrieb Andrzej Popowski:
Right, thanks Gerd. Should be reversed, specific countries first and catch all last:
Didn't work, because maxspeed=DE:rural { set maxspeed=100 } is overwritten from maxspeed~'.*:rural' { set maxspeed=90 }
At the moment i'm trying some rules based on mkgmap_country and more use of 'add' instead of #set'
Bernd
-- amarok2 now playing: artist: Wet Wet Wet title: Love Is All Around [Live At Adam Street] album: Greatest Hits
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Am Freitag, 13. März 2015, 20:08:02 schrieb Gerd Petermann:
I think the attached version with the change proposed by Andrzej should work. The generic rules cannot fire when maxspeed is set to a numeric value.
I thought, 'set' overwrite everything? Bernd -- amarok2 now playing: artist: Creedence Clearwater Revival title: I Heard it Through the Grapevine album: Platinum

This should be work maxspeed~'.*:urban' { set maxspeed=50 } maxspeed=RU:urban { set maxspeed=60 } maxspeed=UA:urban { set maxspeed=60 } maxspeed~'.*:rural' { set maxspeed=90 } maxspeed=AT:rural { set maxspeed=100 } maxspeed=DE:rural { set maxspeed=100 } Am Freitag, 13. März 2015, 20:03:25 schrieb Bernd Weigelt:
Am Freitag, 13. März 2015, 19:44:45 schrieb Andrzej Popowski:
Right, thanks Gerd. Should be reversed, specific countries first and
catch all last: Didn't work, because maxspeed=DE:rural { set maxspeed=100 } is overwritten from maxspeed~'.*:rural' { set maxspeed=90 }
At the moment i'm trying some rules based on mkgmap_country and more use of 'add' instead of #set'
Bernd
-- amarok2 now playing: artist: Creedence Clearwater Revival title: I Heard it Through the Grapevine album: Platinum

Am Freitag, 13. März 2015, 20:22:19 schrieb Bernd Weigelt:
This should be work
maxspeed~'.*:urban' { set maxspeed=50 }
maxspeed=RU:urban { set maxspeed=60 } maxspeed=UA:urban { set maxspeed=60 }
maxspeed~'.*:rural' { set maxspeed=90 }
maxspeed=AT:rural { set maxspeed=100 } maxspeed=DE:rural { set maxspeed=100 }
Am Freitag, 13. März 2015, 20:03:25 schrieb Bernd Weigelt:
Am Freitag, 13. März 2015, 19:44:45 schrieb Andrzej Popowski:
Right, thanks Gerd. Should be reversed, specific countries first and
catch all last: Didn't work, because maxspeed=DE:rural { set maxspeed=100 } is overwritten from maxspeed~'.*:rural' { set maxspeed=90 }
At the moment i'm trying some rules based on mkgmap_country and more use of 'add' instead of #set'
Bernd
Forget it please Andrzej is on the right way Bernd -- amarok2 now playing: artist: Maria Mena title: Lose Control album: White Turns Blue

Hi all, I tried to combine the previous versions to one that looks plausible to me, see attachment. If I hear no complains I'll commit that version on tuesday. Gerd roadspeed.roadspeed <http://gis.19327.n5.nabble.com/file/n5837198/roadspeed.roadspeed> -- View this message in context: http://gis.19327.n5.nabble.com/roadspeed-in-default-style-tp5836280p5837198.... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Am Sonntag, 15. März 2015, 11:06:24 schrieb Andrzej Popowski:
Hi Gerd,
I tried to combine the previous versions to one that looks plausible to me, see attachment.
Looks good to me.
What do you think about this lines, prevent working on railways with maxspeed up to 300 kmh? railway = * & maxspeed = * { delete maxspeed } or as catch all highway !=* & maxspeed = * { delete maxspeed } all other things are ok for me, too. Bernd -- amarok2 now playing:

Hi Bernd, The tag mkgmap:road-speed-max is only used to recalculate the speed attribute of routable ways. Do you think about a map that supports routing for trains? Gerd Bernd Weigelt wrote
Am Sonntag, 15. März 2015, 11:06:24 schrieb Andrzej Popowski:
Hi Gerd,
I tried to combine the previous versions to one that looks plausible to me, see attachment.
Looks good to me.
What do you think about this lines, prevent working on railways with maxspeed up to 300 kmh?
railway = * & maxspeed = * { delete maxspeed }
or as catch all
highway !=* & maxspeed = * { delete maxspeed }
all other things are ok for me, too.
Bernd
-- amarok2 now playing:
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/roadspeed-in-default-style-tp5836280p5837220.... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Am Sonntag, 15. März 2015, 04:29:49 schrieb GerdP:
The tag mkgmap:road-speed-max is only used to recalculate the speed attribute of routable ways.
Do you think about a map that supports routing for trains?
Don't know a map with this feature, but there are many people out there. ;-) The reason for my question is, you're removing maxspeed with maxspeed=signals { delete maxspeed } maxspeed=none { delete maxspeed } but i think this are nonnumeric values, which not passed mkgmap's function to set 'maxspeedkmh()' in MaxSpeedFunction.java. maxspeed=signal|none is removed with maxspeed=* & maxspeedkmh()!=* { delete maxspeed } But railway=* & maxspeed = * passes the filter, when maxspeed is a numeric value. This is my last line in inc/roadspeed, only to see if the rules are working railway=* {echo '${mkgmap:road-speed-max}'} I've got thousands of lines like this two lines 332637568: null 332637569: 4 first line railway without maxspeed, second with maxspeed And the line 'maxspeed~'.*;.*' { set maxspeed='${maxspeed|part:}'; }' is more or less useless, too. I use similar rules in lines or points to get usable values if something like highway=path;track is set. Maxspeed with ';' is a not solvable value, sometimes the first value is the greatest, in other cases the second or third. IMHO this are tagging errors, which should be corrected in the database. We should ignore the maxspeed values in this rarely cases and use the road_speed from lines. Bernd -- amarok2 now playing:

Hi Bernd, I agree that we can remove the extra lines to delete maxspeed. I still see no reason to bother about railways. Do you think that it has an influence on the img output or do you tink that you improve throughput with this extra rule? Gerd Bernd Weigelt wrote
Am Sonntag, 15. März 2015, 04:29:49 schrieb GerdP:
The tag mkgmap:road-speed-max is only used to recalculate the speed attribute of routable ways.
Do you think about a map that supports routing for trains?
Don't know a map with this feature, but there are many people out there. ;-)
The reason for my question is, you're removing maxspeed with
maxspeed=signals { delete maxspeed } maxspeed=none { delete maxspeed }
but i think this are nonnumeric values, which not passed mkgmap's function to set 'maxspeedkmh()' in MaxSpeedFunction.java.
maxspeed=signal|none is removed with maxspeed=* & maxspeedkmh()!=* { delete maxspeed }
But railway=* & maxspeed = * passes the filter, when maxspeed is a numeric value.
This is my last line in inc/roadspeed, only to see if the rules are working
railway=* {echo '${mkgmap:road-speed-max}'}
I've got thousands of lines like this two lines 332637568: null 332637569: 4
first line railway without maxspeed, second with maxspeed
And the line 'maxspeed~'.*;.*' { set maxspeed='${maxspeed|part:}'; }' is more or less useless, too. I use similar rules in lines or points to get usable values if something like highway=path;track is set.
Maxspeed with ';' is a not solvable value, sometimes the first value is the greatest, in other cases the second or third. IMHO this are tagging errors, which should be corrected in the database. We should ignore the maxspeed values in this rarely cases and use the road_speed from lines.
Bernd
-- amarok2 now playing:
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/roadspeed-in-default-style-tp5836280p5837242.... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi,
I agree that we can remove the extra lines to delete maxspeed.
Roadspeed is included at finalize stage. Most processing of highways and railways is done before it. Deleting of maxspeed at this stage shouldn't have any negative impact for default style. The cautious solution would be to restore original value of maxspeed at the end of include, but I don't feel it is necessary. -- Best regards, Andrzej

Am Sonntag, 15. März 2015, 06:10:15 schrieb GerdP: Hi Gerd I don't think that there is a negative influence, but it can improve the troughput a little bit. I have shortened the file a little bit more and merge the test of highway=* to the last lines output with maxspeed=* & maxspeedkmh() =* { echo ' ${mkgmap:road-speed-max}'} 329442750: 0 329651261: 2 330025588: null 330025588: null 330025588: null 330149281: 3 330183871: 4 Can you test the attached file, please? Bernd
I agree that we can remove the extra lines to delete maxspeed. I still see no reason to bother about railways. Do you think that it has an influence on the img output or do you tink that you improve throughput with this extra rule?
-- amarok2 now playing:

Hi Bernd, Andrzejs version makes sure that the include doesn't override mkgmap:road-speed-max if it was set anywhere before. I think we should keep it that way. reg. 25mph=40.25 kmh : Do you propose to change the rule to 41 like below? maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 41 { set mkgmap:road-speed-max = 2 } Gerd From: weigelt.bernd@web.de To: mkgmap-dev@lists.mkgmap.org.uk Date: Sun, 15 Mar 2015 14:53:19 +0100 Subject: Re: [mkgmap-dev] roadspeed in default style Am Sonntag, 15. März 2015, 06:10:15 schrieb GerdP: Hi Gerd I don't think that there is a negative influence, but it can improve the troughput a little bit. I have shortened the file a little bit more and merge the test of highway=* to the last lines output with maxspeed=* & maxspeedkmh() =* { echo ' ${mkgmap:road-speed-max}'} 329442750: 0 329651261: 2 330025588: null 330025588: null 330025588: null 330149281: 3 330183871: 4 Can you test the attached file, please? Bernd
I agree that we can remove the extra lines to delete maxspeed. I still see no reason to bother about railways. Do you think that it has an influence on the img output or do you tink that you improve throughput with this extra rule?
-- amarok2 now playing: _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Am Sonntag, 15. März 2015, 15:08:44 schrieb Gerd Petermann:
Andrzejs version makes sure that the include doesn't override mkgmap:road-speed-max if it was set anywhere before. I think we should keep it that way. Ok, i thougt, because mkgmap:road-speed-max is set only in inc/roadspeed, i can use a short line.
reg. 25mph=40.25 kmh : Do you propose to change the rule to 41 like below? maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 41 { set mkgmap:road-speed-max = 2 }
Can we reformat maxspeedkmh() with maxspeed=* & mkgmap:cache_maxspeedkmh=* {set mkgmap:cache_maxspeedkmh='${mkgmap:cache_maxspeedkmh|part:.:1}'} see the attached file Bernd -- amarok2 now playing:

Hi Bernd, I think you should not change or interpret the values starting with mkgmap:cache_ It is some kind of trick within mkgmap and not documented. Besides that your solution doesn't work with 15mph, which results in 24.14 kmh The table states that 15mph should be treated like 20 km/h. I think we should change the threshold values in the rules instead of manipulating undocumented values, presuming that the table in the file is correct. Ciao, Gerd Bernd Weigelt wrote
Am Sonntag, 15. März 2015, 15:08:44 schrieb Gerd Petermann:
Andrzejs version makes sure that the include doesn't override mkgmap:road-speed-max if it was set anywhere before. I think we should keep it that way. Ok, i thougt, because mkgmap:road-speed-max is set only in inc/roadspeed, i can use a short line.
reg. 25mph=40.25 kmh : Do you propose to change the rule to 41 like below? maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 41 { set mkgmap:road-speed-max = 2 }
Can we reformat maxspeedkmh() with
maxspeed=* & mkgmap:cache_maxspeedkmh=* {set mkgmap:cache_maxspeedkmh='${mkgmap:cache_maxspeedkmh|part:.:1}'}
see the attached file
Bernd
-- amarok2 now playing:
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
roadspeed (1K) <http://gis.19327.n5.nabble.com/attachment/5837269/0/roadspeed>
Bernd Weigelt wrote
Am Sonntag, 15. März 2015, 15:08:44 schrieb Gerd Petermann:
Andrzejs version makes sure that the include doesn't override mkgmap:road-speed-max if it was set anywhere before. I think we should keep it that way. Ok, i thougt, because mkgmap:road-speed-max is set only in inc/roadspeed, i can use a short line.
reg. 25mph=40.25 kmh : Do you propose to change the rule to 41 like below? maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 41 { set mkgmap:road-speed-max = 2 }
Can we reformat maxspeedkmh() with
maxspeed=* & mkgmap:cache_maxspeedkmh=* {set mkgmap:cache_maxspeedkmh='${mkgmap:cache_maxspeedkmh|part:.:1}'}
see the attached file
Bernd
-- amarok2 now playing:
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
roadspeed (1K) <http://gis.19327.n5.nabble.com/attachment/5837269/0/roadspeed>
-- View this message in context: http://gis.19327.n5.nabble.com/roadspeed-in-default-style-tp5836280p5837276.... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Gerd tested a few minutes ago ;-) ... mkgmap:cache_maxspeedkmh=24 maxspeed=15 mph ... But i'll remove this line and put it in a wastebin... I can't categorize streets, without knowledge how they are handled in other countries. Are streets with 25 mph like streets with 30 kmh, pure residential without drive through traffic, or like normal streets with drive through traffic, but limits because of schools? Bernd Where are you? Your system time looks strange ;-) Am Sonntag, 15. März 2015, 08:28:57 schrieb GerdP:
I think you should not change or interpret the values starting with mkgmap:cache_ It is some kind of trick within mkgmap and not documented.
Besides that your solution doesn't work with 15mph, which results in 24.14 kmh The table states that 15mph should be treated like 20 km/h. I think we should change the threshold values in the rules instead of manipulating undocumented values, presuming that the table in the file is correct.
-- amarok2 now playing:

Hi Bernd, Bernd Weigelt wrote
Where are you? Your system time looks strange ;-)
I am at home (Germany), but I use the GIS interface to write this. Guess that's the reason. Gerd -- View this message in context: http://gis.19327.n5.nabble.com/roadspeed-in-default-style-tp5836280p5837284.... Sent from the Mkgmap Development mailing list archive at Nabble.com.

I can answer this one: "Are streets with 25 mph like streets with 30 kmh, pure residential without drive through traffic, or like normal streets with drive through traffic, but limits because of schools?" Normal residential streets in the United States are generally posted 25 or 30 mph but school zones are 15 mph. And in my experience, the school zone limits are usually well enforced. On Mon, Mar 16, 2015 at 12:32 AM, GerdP <gpetermann_muenchen@hotmail.com> wrote:
Hi Bernd,
Bernd Weigelt wrote
Where are you? Your system time looks strange ;-)
I am at home (Germany), but I use the GIS interface to write this. Guess that's the reason.
Gerd
-- View this message in context: http://gis.19327.n5.nabble.com/roadspeed-in-default-style-tp5836280p5837284.... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- Dave Swarthout Homer, Alaska Chiang Mai, Thailand Travel Blog at http://dswarthout.blogspot.com

Hi all, okay, here is my next proposal for the include. I've removed the additional rules to delete maxspeed and changed the threshold values so that the values are set according to the table at the top . If I here no complains I'll commit it on wednesday. Gerd From: daveswarthout@gmail.com Date: Mon, 16 Mar 2015 06:16:16 +0700 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] roadspeed in default style I can answer this one: "Are streets with 25 mph like streets with 30 kmh, pure residential withoutdrive through traffic, or like normal streets with drive through traffic, butlimits because of schools?" Normal residential streets in the United States are generally posted 25 or 30 mph but school zones are 15 mph. And in my experience, the school zone limits are usually well enforced. On Mon, Mar 16, 2015 at 12:32 AM, GerdP <gpetermann_muenchen@hotmail.com> wrote: Hi Bernd, Bernd Weigelt wrote
Where are you?
Your system time looks strange ;-)
I am at home (Germany), but I use the GIS interface to write this. Guess that's the reason. Gerd -- View this message in context: http://gis.19327.n5.nabble.com/roadspeed-in-default-style-tp5836280p5837284.... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -- Dave Swarthout Homer, Alaska Chiang Mai, Thailand Travel Blog at http://dswarthout.blogspot.com _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Am Sonntag, 15. März 2015, 06:10:15 schrieb GerdP:
Do you think that it has an influence on the img output or do you tink that you improve throughput with this extra rule?
another thing when testing with echotags i got, if 'maxspeed=25_mph' is set, a maxspeedkmh()~40.25, so these roads got a mkgmap_road-speed-max=3 instead of mkgmap_road-speed-max=2 We should tweak maxspeedkmh() <= 40 or remove the decimal values from MaxSpeedFunction.java Bernd -- amarok2 now playing:

Am Sonntag, 15. März 2015, 15:01:26 schrieb Bernd Weigelt:
Am Sonntag, 15. März 2015, 06:10:15 schrieb GerdP:
Do you think that it has an influence on the img output or do you tink that you improve throughput with this extra rule?
another thing
when testing with echotags i got, if 'maxspeed=25_mph' is set, a maxspeedkmh()~40.25, so these roads got a mkgmap_road-speed-max=3 instead of mkgmap_road-speed-max=2
We should tweak maxspeedkmh() <= 40 or remove the decimal values from MaxSpeedFunction.java
Bernd an example
4611686018429694841 (9504463) - [mkgmap:exit_hint_ref=5A, mkgmap:way-has-pois=true, mkgmap:road-speed-max=3, maxspeed=25 mph, oneway=yes, width=15.2, mkgmap:admin_level2=USA, ramp=yes, mkgmap:region=Massachusetts, mkgmap:admin_level4=Massachusetts, mkgmap:city=Quincy, highway=motorway_link, mkgmap:admin_level8=Quincy, mkgmap:country=USA, mkgmap:admin_level6=Norfolk County, mkgmap:cache_maxspeedkmh=40.25, mkgmap:label:1=Exit 5A, mkgmap:exit_hint=true] Bernd -- amarok2 now playing:

Hi Bernd,
maybe this rule works as you expected, but it is a catch all, i don't like them ;-)
Right, catch all doesn't look safe. Probably would be better to change "maxspeedkmh()!=*" to "maxspeedkmh()>120".
I think setting mkgmap:road-speed-class is only needed for the highest value, higher then 120 kmh
I would take care to set road_speed=7 only for highway=motorway and this would be better done in "lines" file. On my maps I wouldn't set road_speed=7 anyway, I prefer more realistic values. -- Best regards, Andrzej

Hi Andrzej maxspeedkmh()>120 is what i prefere, too, maxspeedkmh() = * is only for testing the other rules In my style i'm using in lines road_speed=6 for motorways and trunk, with inc/roadspeed it is possible to increase the speed for germany. But this need specific rules for other countries, that has to be the next step. Bernd Am Freitag, 13. März 2015, 18:40:48 schrieb Andrzej Popowski:
Hi Bernd,
maybe this rule works as you expected, but it is a catch all, i don't like them ;-)
Right, catch all doesn't look safe. Probably would be better to change "maxspeedkmh()!=*" to "maxspeedkmh()>120".
I think setting mkgmap:road-speed-class is only needed for the highest value, higher then 120 kmh
I would take care to set road_speed=7 only for highway=motorway and this would be better done in "lines" file. On my maps I wouldn't set road_speed=7 anyway, I prefer more realistic values.
-- amarok2 now playing: artist: Pet Shop Boys title: It's Alright album: Discography
participants (7)
-
Andrzej Popowski
-
Bernd Weigelt
-
Dave Swarthout
-
Felix Hartmann
-
Gerd Petermann
-
GerdP
-
Greg Troxel