> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Map matching (wherobots.matcher)

> Match GPS points to road network edges.

```python theme={"system"}
from wherobots import matcher
```

## load\_osm

```python theme={"system"}
load_osm(osm_path: str, tags_filter: str = '') -> DataFrame
```

Function loads an OSM xml file and retrieves all the edges and locations of the corresponding nodes.

#### Parameters

<ParamField path="osm_path" type="str" required>
  A string that represents path to the OSM xml file
</ParamField>

<ParamField path="tags_filter" type="str" default="''">
  A string denoting the tags to be used for filtering the OSM data
</ParamField>

#### Returns

<ResponseField name="return" type="DataFrame">
  A DataFrame object containing all the edges information required for map matching
</ResponseField>

## match

```python theme={"system"}
match(
    edges_df: DataFrame,
    paths_df: DataFrame,
    edges_geometry: str,
    paths_geometry: str,
    id: str = None,
) -> DataFrame
```

Function performs map matching for a GPS path.

#### Parameters

<ParamField path="edges_df" type="DataFrame" required>
  DataFrame object that contains all edges in the target dataset
</ParamField>

<ParamField path="paths_df" type="DataFrame" required>
  DataFrame object that contains all GPS trips for which map matching need to be performed
</ParamField>

<ParamField path="edges_geometry" type="str" required>
  Name of the geometry column in the edgesDf DataFrame
</ParamField>

<ParamField path="paths_geometry" type="str" required>
  Name of the geometry column in the pathsDf DataFrame
</ParamField>

<ParamField path="id" type="str" default="None">
  Optional - Name of the column in the pathsDf DataFrame that contains the unique identifier for each GPS
  trip. if not provided, the first non-geometry column is used.
</ParamField>

#### Returns

<ResponseField name="return" type="DataFrame">
  A DataFrame object containing the results of map matching
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.