#openstreetmap #osm

bin+lib osmio

Read and write OpenStreetMap data files

12 releases (6 breaking)

Uses old Rust 2015

0.7.0 Feb 25, 2022
0.6.0 Aug 29, 2021
0.5.0 Aug 14, 2021
0.5.0-rc2 Jul 25, 2021
0.1.0 Oct 6, 2019

#1248 in Parser implementations

Download history 28/week @ 2023-02-03 52/week @ 2023-02-10 67/week @ 2023-02-17 21/week @ 2023-02-24 31/week @ 2023-03-03 20/week @ 2023-03-10 20/week @ 2023-03-17 9/week @ 2023-03-24 34/week @ 2023-03-31 28/week @ 2023-04-07 26/week @ 2023-04-14 32/week @ 2023-04-21 42/week @ 2023-04-28 68/week @ 2023-05-05 20/week @ 2023-05-12 34/week @ 2023-05-19

169 downloads per month
Used in 2 crates

AGPL-3.0

310KB
8K SLoC

osmio Read and write OpenStreetMap file

The goal of this library is read and and write OpenStreetMap data files in pure Rust.

There is full read & write support for XML, OPL and read support for PBF file formats.

Library

Binaries

osmio-changeset-tags-to-sqlite

Takes 2 arguments, a changeset file, and a filename for a SQLite database. Creates a table changeset, with 2 columns, changeset_id, other_tags (a JSON array of changeset tags).

Copyright

Copyright GNU Affero General Public Licence 3 or later. Copyright 2017→2021 Amanda McCann amanda@technomancy.org


lib.rs:

Read and write OpenStreetMap files

Reading files

use osmio::prelude::*;

let mut reader = osmio::read_pbf("path/to/filename.osm.pbf")?;
for obj in reader.objects() {
    // ...
}
# Ok::<(), anyhow::Error>(())

Useful things for osmio

Dependencies

~27MB
~513K SLoC