Crates.io | osmx |
lib.rs | osmx |
version | 0.2.0 |
source | src |
created_at | 2024-03-06 19:35:49.967598 |
updated_at | 2024-08-14 03:14:24.494939 |
description | Rust port of OSMExpress - a fast database file format for OpenStreetMap |
homepage | https://github.com/jake-low/osmx-rs |
repository | https://github.com/jake-low/osmx-rs |
max_upload_size | |
id | 1165136 |
size | 55,919 |
This is a Rust port of OSMExpress, a fast storage format for OpenStreetMap data created by Brandon Liu for Protomaps. The format supports random access (looking up nodes, ways and relations by ID), spatial indexing of node locations, and in-place updates.
See the docs for API documentation and the examples directory for commented example programs.
The README, Manual, and Programming Guide of the OSMExpress C++ reference implementation may also be helpful.
This crate supports reading from .osmx
database files, including:
It does not yet support:
.osmx
database, or creating a new .osmx
databasePull requests for these missing features are welcome.
osmx-rs is not designed for reading untrusted input files. Using this crate to read a malformed .osmx
file may cause the process to panic, or worse. Pull requests to improve safety or prevent panics are welcome.
Also worth noting that osmx-rs depends on the lmdb crate, which wraps the LMDB C API and therefore requires the use of unsafe
.
This repository also contains a CLI tool for interacting with .osmx
files.
Usage: osmx-rs [COMMAND] [ARGS...]
Commands:
expand
: convert an OSM PBF file to an OSMX databasestat
: print statistics about the contents of an OSMX databaseThe command is intended to be useful tool, but also to be an illustrative example of how to use the osmx-rs
crate to create and interact with .osmx
files. The source code can be found in the bin/
directory.
This code can be used under the terms of either the MIT license or Apache-2.0 license, at your option.