Package org.opentripplanner.routing.edgetype

Examples of org.opentripplanner.routing.edgetype.PartialStreetEdge


        double lengthRatio = myGeom.getLength() / parentGeom.getLength();
        double length = e.getDistance() * lengthRatio;

        String name = first.getLabel() + " to " + second.getLabel();
        return new PartialStreetEdge(e, first, second, myGeom, name, length);
    }
View Full Code Here


            StreetVertex toStreetVertex = (StreetVertex) toVertex;
            Set<StreetEdge> overlap = overlappingPlainStreetEdges(fromStreetVertex,
                    toStreetVertex);

            for (StreetEdge pse : overlap) {
                PartialStreetEdge ppse = makePartialEdgeAlong(pse, fromStreetVertex, toStreetVertex);
                // Register this edge-fragment as a temporary edge so it will be assigned a routing context and cleaned up.
                // It's connecting the from and to vertices so it could be placed in either vertex's temp edge list.
                ((StreetLocation)fromVertex).getExtra().add(ppse);
            }
        }
View Full Code Here

        double lengthRatioIn = geometries.first.getLength() / totalGeomLength;

        double lengthIn = street.getDistance() * lengthRatioIn;
        double lengthOut = street.getDistance() * (1 - lengthRatioIn);

        StreetWithElevationEdge newLeft = new PartialStreetEdge(street, fromv, base,
                geometries.first, name, lengthIn);
        StreetWithElevationEdge newRight = new PartialStreetEdge(street, base, tov,
                geometries.second, name, lengthOut);

        newLeft.setElevationProfile(ElevationUtils.getPartialElevationProfile(
                street.getElevationProfile(), 0, lengthIn), false);
        newLeft.setNoThruTraffic(street.isNoThruTraffic());
        newLeft.setStreetClass(street.getStreetClass());

        newRight.setElevationProfile(ElevationUtils.getPartialElevationProfile(
                street.getElevationProfile(), lengthIn, lengthIn + lengthOut), false);
        newRight.setStreetClass(street.getStreetClass());
        newRight.setNoThruTraffic(street.isNoThruTraffic());
       
        // Copy turn restrictions onto the outgoing half-edge.
        for (TurnRestriction turnRestriction : graph.getTurnRestrictions(street)) {
            graph.addTurnRestriction(newRight, turnRestriction);
        }
View Full Code Here

TOP

Related Classes of org.opentripplanner.routing.edgetype.PartialStreetEdge

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.