Package com.graphhopper.reader.osm
Class RestrictionConverter
java.lang.Object
com.graphhopper.reader.osm.RestrictionConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkIfCompatibleWithRestriction
(GraphRestriction g, String restriction) convert
(ReaderRelation relation, BaseGraph baseGraph, LongFunction<Iterator<com.carrotsearch.hppc.cursors.IntCursor>> edgesByWay) OSM restriction relations specify turn restrictions between OSM ways (of course).static RestrictionMembers
extractMembers
(ReaderRelation relation) static long[]
getRestrictedWayIds
(ReaderRelation relation) static long
getViaNodeIfViaNodeRestriction
(ReaderRelation relation) static boolean
isTurnRestriction
(ReaderRelation relation)
-
Constructor Details
-
RestrictionConverter
public RestrictionConverter()
-
-
Method Details
-
isTurnRestriction
-
getRestrictedWayIds
-
getViaNodeIfViaNodeRestriction
-
convert
public static Triple<ReaderRelation,GraphRestriction, convertRestrictionMembers> (ReaderRelation relation, BaseGraph baseGraph, LongFunction<Iterator<com.carrotsearch.hppc.cursors.IntCursor>> edgesByWay) throws OSMRestrictionException OSM restriction relations specify turn restrictions between OSM ways (of course). This method converts such a relation into a '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
-
checkIfCompatibleWithRestriction
public static void checkIfCompatibleWithRestriction(GraphRestriction g, String restriction) throws OSMRestrictionException - Throws:
OSMRestrictionException
-
extractMembers
public static RestrictionMembers extractMembers(ReaderRelation relation) throws OSMRestrictionException - Throws:
OSMRestrictionException
-