public boolean hasHighwayTag() { return HighwayTag.highwayTag(this).isPresent(); }
public static boolean isCoreWay(final Taggable taggable) { final Optional<HighwayTag> highway = highwayTag(taggable); return highway.isPresent() && CORE_WAYS.contains(highway.get()); }
public static boolean isCarNavigableHighway(final Taggable taggable) { final Optional<HighwayTag> highway = highwayTag(taggable); return highway.isPresent() && CAR_NAVIGABLE_HIGHWAYS.contains(highway.get()); }
public static boolean isMetricHighway(final Taggable taggable) { final Optional<HighwayTag> highway = highwayTag(taggable); return highway.isPresent() && METRICS_HIGHWAYS.contains(highway.get()); }
public static boolean isPedestrianNavigableHighway(final Taggable taggable) { final Optional<HighwayTag> highway = highwayTag(taggable); return highway.isPresent() && PEDESTRIAN_NAVIGABLE_HIGHWAYS.contains(highway.get()); }
/** * @return The {@link HighwayTag} of the Edge, if it is present. Return HighwayTag.NO if it is * not. */ public HighwayTag highwayTag() { final Optional<HighwayTag> result = HighwayTag.highwayTag(this); if (result.isPresent()) { return result.get(); } else { return HighwayTag.NO; } }
public static boolean isHighwayWithLink(final Taggable taggable) { final Optional<HighwayTag> highway = highwayTag(taggable); return highway.isPresent() && HIGHWAY_LINKS.containsKey(highway.get()); }
public static boolean isLinkHighway(final Taggable taggable) { final Optional<HighwayTag> highway = highwayTag(taggable); return highway.isPresent() && HIGHWAY_LINKS.containsValue(highway.get()); }
/** * Checks if an {@link AtlasObject} is of an equal or greater priority than the minimum. The * minimum is supplied as a configuration parameter, the default is {@code "tertiary"}. * * @param object * an {@link AtlasObject} * @return {@code true} if this object is >= the minimum */ private boolean isMinimumHighway(final AtlasObject object) { final Optional<HighwayTag> result = HighwayTag.highwayTag(object); return result.isPresent() && result.get().isMoreImportantThanOrEqualTo(this.minimumHighwayType); }
/** * Checks if highway tag of given {@link AtlasObject} is of greater or equal priority than the * minimum highway type given in the configurable. If no value is given in configurable, the * default highway type of "SERVICE" will be set as minimum. * * @param object * an {@link AtlasObject} * @return {@code true} if the highway tag of this object is greater than or equal to the * minimum type */ private boolean isMinimumHighwayType(final AtlasObject object) { final Optional<HighwayTag> highwayTagOfObject = HighwayTag.highwayTag(object); return highwayTagOfObject.isPresent() && highwayTagOfObject.get().isMoreImportantThanOrEqualTo(this.highwayMinimum); } }
/** * Validates given {@link AtlasObject} (assumed to be an {@link Edge}) whether it is a valid * crossing edge or not * * @param object * {@link AtlasObject} to test * @return {@code true} if given {@link AtlasObject} object is a valid crossing edge */ private boolean isValidCrossingEdge(final AtlasObject object) { if (Edge.isMasterEdgeIdentifier(object.getIdentifier()) && !TagPredicates.IS_AREA.test(object) && !this.isFlagged(object.getIdentifier())) { final Optional<HighwayTag> highway = HighwayTag.highwayTag(object); if (highway.isPresent()) { final HighwayTag highwayTag = highway.get(); return HighwayTag.isCarNavigableHighway(highwayTag) && !HighwayTag.CROSSING.equals(highwayTag) && highwayTag.isMoreImportantThanOrEqualTo(this.minimumHighwayType); } } return false; }
if (!this.rampEdgeFilter.test(nextEdge) && HighwayTag.highwayTag(nextEdge) .orElse(HighwayTag.NO).isMoreImportantThanOrEqualTo(arterialMinimum))
@Override protected Optional<CheckFlag> flag(final AtlasObject object) return HighwayTag.highwayTag(object)