Crate osmio

Source
Expand description

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() {
    // ...
}

Modules§

arcpbf
PBF/Protobuf file format and return ArcOSMObj’s
changesets
Changeset dump files
obj_types
Base OpenStreetMap object types
osc
OSC File format
pbf
Read PBF file (currently alias for stringpbf::)
prelude
Useful things for osmio
stringpbf
PBF/Protobuf file format and return StringOSMObj’s
utils
Misc local utilities
xml
XML file format

Structs§

Lat
Latitude and Longitude are stored internally as a 32-bit signed integer, in units of COORD_PRECISION_NANOS.
Lon
Latitude and Longitude are stored internally as a 32-bit signed integer, in units of COORD_PRECISION_NANOS.
OSMObjectIterator
Something that produces OSMObjects

Enums§

OSMObjectType
A Node, Way or Relation
OSMWriteError
An error when trying to write from an OSMWriter
ParseLatLonError
An error while trying to parse a string into a Lat or Lon
TimestampFormat
Timestamps can be stored as an ISO formatted string, or number of seconds since unix epoch

Constants§

COORD_PRECISION_NANOS
How many nanodegrees are represented by each unit in Lat::inner(). We use the same internal precision as OpenStreetMap.org, 100 nanodegrees.
COORD_SCALE_FACTOR
Number of internal units (as returned from Lat::inner) in one degree.

Traits§

Node
A Node
OSMObj
Something which could be any one of the possible OSM objects
OSMObjBase
The basic metadata fields all OSM objects share
OSMReader
A Generic reader that reads OSM objects
OSMWriter
A generic writer for OSM objects.
Relation
A Relation
Way
A Way

Functions§

lat_lon_inner_to_degrees
read_pbf
Opens a PBF filename
read_xml
Opens a bzip2 filename
version
The version string of this library.

Type Aliases§

ObjId
Type that stores the OSM Id