[mkgmap-dev] maxspeed tag vs road_speed preset
From Thilo Hannemann thannema at gmx.de on Thu May 21 07:51:55 BST 2009
Hi Marco, the relationship between the maxspeed tag and the road_speed is hardcoded in mkgmap. This is reasonable in general, because otherwise the style files had to be much larger to cover all the possible road_speeds per road. But if you want to use the road_speed in a creative way (say for a cycle map) this gets in the way. The evaluation of the maxspeed tag is implemented in src/uk/me/ parabola/mkgmap/osmstyle/StyledConverter.java. The following patch will remove it. Index: StyledConverter.java =================================================================== --- StyledConverter.java (revision 1038) +++ StyledConverter.java (working copy) @@ -619,16 +619,8 @@ road.setOneway(); } - // maxspeed attribute overrides default for road type - - String maxSpeed = way.getTag("maxspeed"); - int speedIdx = -1; - - if(maxSpeed != null) - speedIdx = getSpeedIdx(maxSpeed); + road.setSpeed(gt.getRoadSpeed()); - road.setSpeed(speedIdx >= 0? speedIdx : gt.getRoadSpeed()); - boolean[] noAccess = new boolean[RoadNetwork.NO_MAX]; String highwayType = way.getTag("highway"); if(highwayType == null) { Regards Thilo
- Previous message: [mkgmap-dev] maxspeed tag vs road_speed preset
- Next message: [PATCH v1] Re: [mkgmap-dev] maxspeed tag vs road_speed preset
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list