Package com.wherobots

Class Matcher

java.lang.Object
com.wherobots.Matcher

public class Matcher extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>
    loadOSM(String osmPath)
    Perform map matching between an RDD of edges and an RDD of GPS tracks
    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
    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
    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, String idFieldName)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 longitudes
      pathsDf - 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 points
      colEdgesGeom - A string denoting the geometry column in the edges dataFrame
      colPathsGeom - A string denoting the geometry column in the paths dataFrame
      Returns:
      A DataFrame consisting of map matching results for each target GPS tracks
    • 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, String idFieldName)
    • 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 file
      tagsFilter - 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

      public static org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> loadOSM(String osmPath)
      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