Package com.wherobots
Class Matcher
java.lang.Object
com.wherobots.Matcher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>
Perform map matching between an RDD of edges and an RDD of GPS tracksstatic org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>
Perform map matching between an RDD of edges and an RDD of GPS tracksstatic org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>
match
(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> edgesDf, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> pathsDf, String colEdgesGeom, String colPathsGeom) Perform map matching between an RDD of edges and an RDD of GPS tracksstatic org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>
match
(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> edgesDf, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> pathsDf, String colEdgesGeom, String colPathsGeom, String idFieldName)
-
Constructor Details
-
Matcher
public Matcher()
-
-
Method Details
-
match
public static org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> match(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> edgesDf, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> pathsDf, String colEdgesGeom, String colPathsGeom) Perform map matching between an RDD of edges and an RDD of GPS tracks- Parameters:
edgesDf
- A DataFrame consisting of all edges in the dataset. Each row in the RDD contains source node ID, destination node ID, a geometry column of type LineString that connects source and destination nodes, source node latitudes and longitudes, destination node latitudes and longitudespathsDf
- A DataFrame consisting of all target GPS tracks for map matching. Ecah row contains the track ID, sequence of coordinates, and a geometry column of type LineString connecting all GPS pointscolEdgesGeom
- A string denoting the geometry column in the edges dataFramecolPathsGeom
- A string denoting the geometry column in the paths dataFrame- Returns:
- A DataFrame consisting of map matching results for each target GPS tracks
-
match
-
loadOSM
public static org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> loadOSM(String osmPath, String tagsFilter) Perform map matching between an RDD of edges and an RDD of GPS tracks- Parameters:
osmPath
- A string denoting the path to the OSM xml filetagsFilter
- A string denoting the tags to be used for filtering the OSM data- Returns:
- A Spatial DataFrame representing the edges DataFrame required for map matching
-
loadOSM
Perform map matching between an RDD of edges and an RDD of GPS tracks- Parameters:
osmPath
- A string denoting the path to the OSM xml file- Returns:
- A Spatial DataFrame representing the edges DataFrame required for map matching
-