logo separator

[mkgmap-dev] Anyone tried the arc tweezing patches?

From Felix Hartmann extremecarver at googlemail.com on Thu Oct 15 00:20:35 BST 2009

How shall I merge this, it is conflicting - when using the patch version 
mkgmap does not compile.

*mine*
       if("roundabout".equals(way.getTag("junction")))
            road.setRoundabout(true);

        road.setLinkRoad(gt.getType() == 0x08 || gt.getType() == 0x09);

        // set road parameters.
        road.setRoadClass(gt.getRoadClass());
        if (way.isBoolTag("oneway")) {
            road.setDirection(true);
            road.setOneway();
*
patch version:*
    // set road parameters

        // road class (can be overriden by mkgmap:road-class tag)
        int roadClass = gt.getRoadClass();
        String val = way.getTag("mkgmap:road-class");
        if(val != null) {
            if(val.startsWith("-")) {
                roadClass -= Integer.decode(val.substring(1));
            }
            else if(val.startsWith("+")) {
                roadClass += Integer.decode(val.substring(1));
            }
            else {
                roadClass = Integer.decode(val);
            }
            int roadClassMax = 4;
            int roadClassMin = 0;
            val = way.getTag("mkgmap:road-class-max");
            if(val != null)
                roadClassMax = Integer.decode(val);
            val = way.getTag("mkgmap:road-class-min");
            if(val != null)
                roadClassMin = Integer.decode(val);
            if(roadClass > roadClassMax)
                roadClass = roadClassMax;
            else if(roadClass < roadClassMin)
                roadClass = roadClassMin;
            log.info("POI changing road class of " + way.getName() + " 
(" + way.getId() + ") to " + roadClass + " at " + points.get(0));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20091015/70d32ac0/attachment.html 


More information about the mkgmap-dev mailing list