Skip to content

Open Street Map Public Transport Parser

License

Notifications You must be signed in to change notification settings

cualbondi/osmptparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Street Map Public Transport Parser

Status codecov

Test how it works

git clone git@github.com:cualbondi/osmptparser.git
wget http://download.geofabrik.de/south-america/ecuador-latest.osm.pbf
cargo run --example main ecuador-latest.osm.pbf

Time it

cargo build --release --example main && /usr/bin/time -v target/release/examples/main ecuador-latest.osm.pbf

CLI

cargo run --release ./ecuador-latest.osm.pbf --filter "boundary=national_park"

you should get a json list with one geojson per area that matches with the filter

cargo run --release ./ecuador-latest.osm.pbf --filter-ptv2

you should get a json list with one geojson per ptv2 containing a linestring and each stop

Run CI linter + recommendations + tests

cargo fmt -- --check && cargo clippy -- -D warnings -A clippy::ptr-arg && cargo test

Build pbf test file

wget http://download.geofabrik.de/south-america/ecuador-latest.osm.pbf
osmconvert ecuador-latest.osm.pbf -o=ecuador.o5m
osmfilter ecuador.o5m --keep= --keep-relations="@id=85965 =2030162" > test.o5m
osmconvert test.o5m -o=test.pbf
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy