Skip to content

Commit 48e2da7

Browse files
authored
Improve tool description
1 parent bda7775 commit 48e2da7

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
11
# Open Street Map Public Transport Parser
22

3+
A tool to parse broken/disconnected relations from openstreetmap, reconnect them with some tolerance, sort the internal points, and output them as GeoJSON linestrings.
4+
5+
It can understand and reconstruct
6+
- relations that represent public transport v2
7+
- ways and relations that represent areas
8+
9+
Blazing fast by design: every step in the process pipeline is fully parallelized for maximum speed using all available cpus by default.
10+
11+
### How it works
12+
13+
1. Reads data from a .pbf file, extracting ways and relations filtered by attributes specified via the `--filter` argument.
14+
2. Processes each relation as follows:
15+
1. Sorts all the ways within the relation based on proximity.
16+
2. Joins ways that share identical lat/lng coordinates at their first or last nodes, combining them into a single LineString.
17+
3. If multiple LineStrings remain after this step:
18+
- It checks for gaps.
19+
- If the gaps are smaller than the specified gap threshold (in meters, default: 150), they are joined into one LineString.
20+
3. Outputs a JSON array, with one GeoJSON feature per way or relation found, including:
21+
- For areas: a single LineString or MultiLineString feature.
22+
- For public transport: a LineString representing the full path and an array of points representing the stops.
23+
24+
[See the blogpost](https://jperelli.com.ar/post/2019/08/12/oxidizing-cualbondi/) for a very detailed description
25+
26+
### Status
27+
328
[![Status](https://github.com/cualbondi/osmptparser/workflows/Test/badge.svg)](https://github.com/cualbondi/osmptparser/actions)
429
[![codecov](https://codecov.io/gh/cualbondi/osmptparser/branch/master/graph/badge.svg)](https://codecov.io/gh/cualbondi/osmptparser)
530

6-
## Test how it works
31+
## Try it
732

833
```
934
git clone git@github.com:cualbondi/osmptparser.git

0 commit comments

Comments
 (0)