Package com.graphhopper.reader.osm
Class OSMRestrictionConverter
java.lang.Object
com.graphhopper.reader.osm.OSMRestrictionConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<RestrictionSetter.Restriction>buildRestrictionsForOSMRestriction(BaseGraph baseGraph, RestrictionTopology topology, RestrictionType type) Converts an OSM restriction to (multiple) single 'no' restrictions to be fed intoRestrictionSetterbuildRestrictionTopologyForGraph(BaseGraph baseGraph, ReaderRelation relation, LongFunction<Iterator<com.carrotsearch.hppc.cursors.IntCursor>> edgesByWay) OSM restriction relations specify turn restrictions between OSM ways (of course).static voidcheckIfTopologyIsCompatibleWithRestriction(RestrictionTopology g, String restriction) static RestrictionMembersextractMembers(ReaderRelation relation) static long[]getRestrictedWayIds(ReaderRelation relation) static longgetViaNodeIfViaNodeRestriction(ReaderRelation relation) static booleanisTurnRestriction(ReaderRelation relation)
-
Constructor Details
-
OSMRestrictionConverter
public OSMRestrictionConverter()
-
-
Method Details
-
isTurnRestriction
-
getRestrictedWayIds
-
getViaNodeIfViaNodeRestriction
-
buildRestrictionTopologyForGraph
public static Triple<ReaderRelation,RestrictionTopology, buildRestrictionTopologyForGraphRestrictionMembers> (BaseGraph baseGraph, ReaderRelation relation, LongFunction<Iterator<com.carrotsearch.hppc.cursors.IntCursor>> edgesByWay) throws OSMRestrictionException OSM restriction relations specify turn restrictions between OSM ways (of course). This method rebuilds the topology of such a relation in the graph representation, where the turn restrictions are specified in terms of edge/node IDs instead of OSM IDs.- Throws:
OSMRestrictionException- if the given relation is either not valid in some way and/or cannot be handled and shall be ignored
-
checkIfTopologyIsCompatibleWithRestriction
public static void checkIfTopologyIsCompatibleWithRestriction(RestrictionTopology g, String restriction) throws OSMRestrictionException - Throws:
OSMRestrictionException
-
extractMembers
public static RestrictionMembers extractMembers(ReaderRelation relation) throws OSMRestrictionException - Throws:
OSMRestrictionException
-
buildRestrictionsForOSMRestriction
public static List<RestrictionSetter.Restriction> buildRestrictionsForOSMRestriction(BaseGraph baseGraph, RestrictionTopology topology, RestrictionType type) Converts an OSM restriction to (multiple) single 'no' restrictions to be fed intoRestrictionSetter
-