Routify Documentation
Loading...
Searching...
No Matches
ch.routify.graph.CustomEdge Class Reference
Inheritance diagram for ch.routify.graph.CustomEdge:
[legend]
Collaboration diagram for ch.routify.graph.CustomEdge:
[legend]

Public Member Functions

 CustomEdge (CustomVertex source, CustomVertex target, JSONObject tags, Long osmId) throws Exception
 
void loadMetaData ()
 
void correctAltitude ()
 
String getTag (String tag)
 
CustomVertex getSourceVertex ()
 
CustomVertex getTargetVertex ()
 
double getEdgeWeight ()
 
double getTravelTime (String transportMode)
 
Double getTravelTime (String transportMode, boolean includeTraveltime)
 
HashMap< String, Double > getTraveltime (boolean includeTraveltime)
 
void setAqius (double aqius)
 
double getPm_10 ()
 
JSONObject getTags ()
 
Long getOsmId ()
 
long getId ()
 
double getDistance ()
 
double getSlope ()
 
double getNoise ()
 
double getGreenIndex ()
 
double getAqius ()
 
String getHighway ()
 
double getMaxspeed ()
 
double getBearing ()
 
String getCardinalDirection ()
 

Static Public Member Functions

static CustomEdge getById (long id)
 

Public Attributes

final long id
 
String highway
 
double bearing
 
String cardinalDirection
 

Static Public Attributes

static double avgPm10 = 0.0
 
static double maxPm10 = 0.0
 
static double minPm10 = Double.MAX_VALUE
 

Detailed Description

CustomEdge extends the DefaultWeightedEdge class to model edges in a graph with additional attributes specific to mapping applications. It includes information such as elevation, distance, noise level, and attributes for bridges, tunnels, and types of roads. Additionally, it calculates travel times for different modes of transport.

Author
Alexander Eggerth
Since
2025-02-05 (Updated for realistic default speed by Sachit Mahajan)
Version
1.1

Constructor & Destructor Documentation

◆ CustomEdge()

ch.routify.graph.CustomEdge.CustomEdge ( CustomVertex source,
CustomVertex target,
JSONObject tags,
Long osmId ) throws Exception
inline

Member Function Documentation

◆ correctAltitude()

void ch.routify.graph.CustomEdge.correctAltitude ( )
inline

Sets the altitude value of the source vertex and target vertex to the average value of the direct neighbours and recomputes slope, this is necessary because outliers can be reduced.

◆ getAqius()

double ch.routify.graph.CustomEdge.getAqius ( )
inline

◆ getBearing()

double ch.routify.graph.CustomEdge.getBearing ( )
inline

◆ getById()

static CustomEdge ch.routify.graph.CustomEdge.getById ( long id)
inlinestatic

Returns CustomEdge associated with the provided id

Parameters
idthe id to look up
Returns
the CustomEdge associated with the id, or null if not found

◆ getCardinalDirection()

String ch.routify.graph.CustomEdge.getCardinalDirection ( )
inline

◆ getDistance()

double ch.routify.graph.CustomEdge.getDistance ( )
inline

◆ getEdgeWeight()

double ch.routify.graph.CustomEdge.getEdgeWeight ( )
inline

◆ getGreenIndex()

double ch.routify.graph.CustomEdge.getGreenIndex ( )
inline

◆ getHighway()

String ch.routify.graph.CustomEdge.getHighway ( )
inline

◆ getId()

long ch.routify.graph.CustomEdge.getId ( )
inline

◆ getMaxspeed()

double ch.routify.graph.CustomEdge.getMaxspeed ( )
inline

◆ getNoise()

double ch.routify.graph.CustomEdge.getNoise ( )
inline

◆ getOsmId()

Long ch.routify.graph.CustomEdge.getOsmId ( )
inline

◆ getPm_10()

double ch.routify.graph.CustomEdge.getPm_10 ( )
inline

◆ getSlope()

double ch.routify.graph.CustomEdge.getSlope ( )
inline

◆ getSourceVertex()

CustomVertex ch.routify.graph.CustomEdge.getSourceVertex ( )
inline

◆ getTag()

String ch.routify.graph.CustomEdge.getTag ( String tag)
inline

◆ getTags()

JSONObject ch.routify.graph.CustomEdge.getTags ( )
inline

◆ getTargetVertex()

CustomVertex ch.routify.graph.CustomEdge.getTargetVertex ( )
inline

◆ getTravelTime() [1/2]

double ch.routify.graph.CustomEdge.getTravelTime ( String transportMode)
inline

◆ getTravelTime() [2/2]

Double ch.routify.graph.CustomEdge.getTravelTime ( String transportMode,
boolean includeTraveltime )
inline

Gets travel time for a specific transport mode, or null if travel time is disabled. This method is used for conditional serialization.

Parameters
transportModeThe transport mode to get travel time for.
includeTraveltimeWhether to include travel time in the response.
Returns
Travel time in minutes, or null if travel time is disabled.

◆ getTraveltime()

HashMap< String, Double > ch.routify.graph.CustomEdge.getTraveltime ( boolean includeTraveltime)
inline

Gets the travel time map, or null if travel time is disabled. This method is used for conditional serialization.

Parameters
includeTraveltimeWhether to include travel time in the response.
Returns
Travel time map, or null if travel time is disabled.

◆ loadMetaData()

void ch.routify.graph.CustomEdge.loadMetaData ( )
inline

Inspects cached meta data and checks for values associated with the edgs osm id depends on CossMapsSystem

◆ setAqius()

void ch.routify.graph.CustomEdge.setAqius ( double aqius)
inline

Member Data Documentation

◆ avgPm10

double ch.routify.graph.CustomEdge.avgPm10 = 0.0
static

◆ bearing

double ch.routify.graph.CustomEdge.bearing

◆ cardinalDirection

String ch.routify.graph.CustomEdge.cardinalDirection

◆ highway

String ch.routify.graph.CustomEdge.highway

◆ id

final long ch.routify.graph.CustomEdge.id

◆ maxPm10

double ch.routify.graph.CustomEdge.maxPm10 = 0.0
static

◆ minPm10

double ch.routify.graph.CustomEdge.minPm10 = Double.MAX_VALUE
static

The documentation for this class was generated from the following file: