This is an automated email from the git hooks/post-receive script. sebastic pushed a commit to branch master in repository mkgmap.
commit e99c0f172fc1283e07dc4f5be70895bd1808f430 Author: Bas Couwenberg <sebas...@xs4all.nl> Date: Fri Apr 3 13:21:00 2015 +0200 Imported Upstream version 0.0.0+svn3498 --- doc/styles/internal-tags.txt | 17 ++++----- doc/styles/rules.txt | 14 ++++---- resources/mkgmap-version.properties | 4 +-- resources/styles/default/inc/roadspeed | 40 +++++++++++++++------- src/uk/me/parabola/imgfmt/app/mdr/Mdr7.java | 10 +++--- src/uk/me/parabola/imgfmt/app/mdr/Mdr7Record.java | 8 +++++ .../parabola/mkgmap/osmstyle/StyledConverter.java | 21 ++++++++---- 7 files changed, 72 insertions(+), 42 deletions(-) diff --git a/doc/styles/internal-tags.txt b/doc/styles/internal-tags.txt index d2abd11..04a3af8 100644 --- a/doc/styles/internal-tags.txt +++ b/doc/styles/internal-tags.txt @@ -59,14 +59,15 @@ A112 | Usually only the first label is displayed. On some units the second label [options="header"] |========================================================= | Tag | Description | Required mkgmap option -| +mkgmap:way-has-pois+ | +true+ for ways that have at least one point with a tag +access=\*+, +barrier=\*+, or +highway=*+ | 'link-pois-to-ways' -| +mkgmap:dead-end-check+ | Set to +false+ to disable the dead end check for a specific way | 'report-dead-ends' -| +mkgmap:flare-check+ | Set to +true+ to force the flare check for a specific way, set to +false+ to disable it | 'check-roundabout-flares' -| +mkgmap:dir-check+ | Set to +false+ to tell mkgmap to ignore the way when checking roundabouts for clockwise direction | 'check-roundabouts' -| +mkgmap:no-dir-check+ | Set to +true+ to tell mkgmap to ignore the way when checking roundabouts for clockwise direction | 'check-roundabouts' - -|========================================================= - +| +mkgmap:way-has-pois+ | +true+ for ways that have at least one point with a tag +access=\*+, +barrier=\*+, or +highway=*+ | 'link-pois-to-ways' +| +mkgmap:dead-end-check+ | Set to +false+ to disable the dead end check for a specific way | 'report-dead-ends' +| +mkgmap:flare-check+ | Set to +true+ to force the flare check for a specific way, set to +false+ to disable it | 'check-roundabout-flares' +| +mkgmap:dir-check+ | Set to +false+ to tell mkgmap to ignore the way when checking roundabouts for direction | 'check-roundabouts' +| +mkgmap:no-dir-check+ | Set to +true+ to tell mkgmap to ignore the way when checking roundabouts for direction | 'check-roundabouts' +| +mkgmap:synthesised+ | Set to +true+ to tell mkgmap that this is an additional way created using the continue statement in an action block and that it should be excluded from checks | 'check-roundabouts', 'check-roundabout-flares' + +|========================================================= + .POI address tags [options="header"] diff --git a/doc/styles/rules.txt b/doc/styles/rules.txt index db7f725..5c427c8 100644 --- a/doc/styles/rules.txt +++ b/doc/styles/rules.txt @@ -727,13 +727,13 @@ a single OSM element. This could be for clever effects created by stacking two lines on top of each other. For example if you want to mark a bridge in a distinctive way you could match on +bridge=yes+, you would then almost always use +continue+ so -that the +highway+ tag could be matched later. If you failed to do this -then there might be a break in the road for routing purposes. - -Note that by default when using the _continue_ statement the action block -of the rule (if there is one) will only be applied _within this rule_ and -not during any following rule matches. Use the _continue with_actions_ -statement if you want to change this behaviour (see next section). +that the +highway+ tag could be matched later. If you failed to do this +then there might be a break in the road for routing purposes. + +Note that when using the _continue_ statement, the action block +of the rule (if there is one) will only be applied _within this rule_ and +not during any following rule matches. Use the _continue with_actions_ +statement if you want to change this behaviour (see next section). === continue with_actions === The with_actions statement modifies the continue behaviour in such a way, diff --git a/resources/mkgmap-version.properties b/resources/mkgmap-version.properties index 7a0d191..e93b584 100644 --- a/resources/mkgmap-version.properties +++ b/resources/mkgmap-version.properties @@ -1,2 +1,2 @@ -svn.version: 3478 -build.timestamp: 2015-02-26T07:49:21+0000 +svn.version: 3498 +build.timestamp: 2015-03-18T08:13:59+0000 diff --git a/resources/styles/default/inc/roadspeed b/resources/styles/default/inc/roadspeed index 47eb94d..b0a791b 100644 --- a/resources/styles/default/inc/roadspeed +++ b/resources/styles/default/inc/roadspeed @@ -1,7 +1,6 @@ # -# Sets the road speed based on the maxspeed tag. -# In case mkgmap:road-speed-class is set the element -# road_speed is overriden. +# Sets the maximum road speed based on the maxspeed tag. +# In case mkgmap:road-speed-max is set the element road_speed is limited. # # road_speed classification: # road_speed | highest speed @@ -15,12 +14,29 @@ # 0 | 3 mph / 5 km/h # -maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 110 { set mkgmap:road-speed-class = 7 } -maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 90 { set mkgmap:road-speed-class = 6 } -maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 80 { set mkgmap:road-speed-class = 5 } -maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 60 { set mkgmap:road-speed-class = 4 } -maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 40 { set mkgmap:road-speed-class = 3 } -maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 20 { set mkgmap:road-speed-class = 2 } -# change class 1 to 10 km/h which is not correct but better handles living_streets with maxspeed=7 -maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 10 { set mkgmap:road-speed-class = 1 } -maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh()=* { set mkgmap:road-speed-class = 0 } +maxspeed=walk { set maxspeed=10 } +maxspeed~'.*:living_street' { set maxspeed=10 } + +maxspeed=RU:urban { set maxspeed=60 } +maxspeed=UA:urban { set maxspeed=60 } +maxspeed~'.*:urban' { set maxspeed=50 } + +maxspeed=AT:rural { set maxspeed=100 } +maxspeed=DE:rural { set maxspeed=100 } +maxspeed~'.*:rural' { set maxspeed=90 } + +maxspeed~'.*:trunk' { set maxspeed=100 } +maxspeed~'.*:motorway' { set maxspeed=130 } + +# delete maxspeed if we still cannot convert it to km/h +maxspeed=* & maxspeedkmh()!=* { delete maxspeed } + +maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 10 { set mkgmap:road-speed-max = 0 } +maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 25 { set mkgmap:road-speed-max = 1 } +maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 45 { set mkgmap:road-speed-max = 2 } +maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 60 { set mkgmap:road-speed-max = 3 } +maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 85 { set mkgmap:road-speed-max = 4 } +maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 100 { set mkgmap:road-speed-max = 5 } +maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 120 { set mkgmap:road-speed-max = 6 } +# mkgmap:road-speed-max = 7 has no effect +#maxspeed=* & mkgmap:road-speed-max!=* { set mkgmap:road-speed-max = 7 } \ No newline at end of file diff --git a/src/uk/me/parabola/imgfmt/app/mdr/Mdr7.java b/src/uk/me/parabola/imgfmt/app/mdr/Mdr7.java index e4f1af6..1709975 100644 --- a/src/uk/me/parabola/imgfmt/app/mdr/Mdr7.java +++ b/src/uk/me/parabola/imgfmt/app/mdr/Mdr7.java @@ -167,12 +167,10 @@ public class Mdr7 extends MdrMapSection { Sort sort = getConfig().getSort(); List<SortKey<Mdr7Record>> sortedStreets = new ArrayList<>(allStreets.size()); for (Mdr7Record m : allStreets) { - String partialName = m.getPartialName(); - String name = m.getName(); - SortKey<Mdr7Record> nameKey = sort.createSortKey(m, m.getName(), m.getMapIndex()); - SortKey<Mdr7Record> partialKey = name.equals(partialName) ? nameKey : sort.createSortKey(m, partialName); - MultiSortKey<Mdr7Record> sortKey = new MultiSortKey<>(partialKey, nameKey, null); - sortedStreets.add(sortKey); + sortedStreets.add(new MultiSortKey<>( + sort.createSortKey(m, m.getPartialName()), + sort.createSortKey(m, m.getInitialPart(), m.getMapIndex()), + null)); } Collections.sort(sortedStreets); diff --git a/src/uk/me/parabola/imgfmt/app/mdr/Mdr7Record.java b/src/uk/me/parabola/imgfmt/app/mdr/Mdr7Record.java index 6a3562e..1de7e0a 100644 --- a/src/uk/me/parabola/imgfmt/app/mdr/Mdr7Record.java +++ b/src/uk/me/parabola/imgfmt/app/mdr/Mdr7Record.java @@ -69,6 +69,10 @@ public class Mdr7Record extends RecordBase implements NamedRecord { return city; } + public int getNameOffset() { + return nameOffset & 0xff; + } + public void setNameOffset(byte nameOffset) { this.nameOffset = nameOffset; } @@ -109,4 +113,8 @@ public class Mdr7Record extends RecordBase implements NamedRecord { public String toString() { return name + " in " + city.getName(); } + + public String getInitialPart() { + return name.substring(0, (nameOffset & 0xff)); + } } diff --git a/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java b/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java index d5a98d9..f271115 100644 --- a/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java +++ b/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java @@ -456,17 +456,24 @@ public class StyledConverter implements OsmConverter { Way cycleWay = new Way(way.getId(), way.getPoints()); cycleWay.copyTags(way); - String name = way.getTag("name"); - if(name != null) - name += " (cycleway)"; - else - name = "cycleway"; - cycleWay.addTag("name", name); cycleWay.addTag("access", "no"); cycleWay.addTag("bicycle", "yes"); - cycleWay.addTag("foot", "no"); cycleWay.addTag("mkgmap:synthesised", "yes"); cycleWay.addTag(onewayTagKey, "no"); + // remove explicit access tags + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("truck"); return cycleWay; } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mkgmap.git _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel