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
. - OSMObject
Iterator - Something that produces OSMObjects
Enums§
- OSMObject
Type - A Node, Way or Relation
- OSMWrite
Error - An error when trying to write from an OSMWriter
- Parse
LatLon Error - An error while trying to parse a string into a
Lat
orLon
- Timestamp
Format - 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
- OSMObj
Base - 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