Geow is a lightweight API for processing OpenStreetMap elements.
Features:
- Lightweight domain model
- Parsing of Osm files. Currently .osm (xml), .osm.bz2 (zipped xml), .pbf (binary) and .geojson (as denormalized model objects) are supported.
- High-performance binary serialization using scala pickling
- Support for geometric denormalization (i.e. Osm objects contain the full geometry)
- GeoJSON serialization
- Efficient and flexible geo-hashing utilities
- Good binary Serialization using scodec
- Geometry simplification using the Douglas-Peucker-Algorithm
Planned:
- Remove every last trace of Java code
Make sure your build.sbt
contains the Sonatype snapshot resolver.
resolvers +=
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
Then just add a library dependency.
libraryDependencies += "io.plasmap" %% "geow" % "0.3.11-SNAPSHOT"
Stream Osm files to process Osm objects. Currently files in .osm, .osm.bz2, .pbf and .geojson formats are supported.
import io.plasmap.parser.OsmParser
// create a parser from a file
val parser = OsmParser(fileName)
// pull openstreetmap data
for (elem <- parser) println(elem)
Serialize and deserialize Osm objects for network transfer.
import io.plasmap.serializer.OsmSerializer._
... parse or create an osm object element
val serialized = toBinary(osmObject)
val deserialized = fromBinary(serialized)
See the Benchmarks wiki page.
If you like to contribute, please create an issue and send a pull request. For more information on pull requests see the Github pull request tutorial.
We develop geow with λ at plasmap. Follow @plasmapio on twitter.