Coder Social home page Coder Social logo

geow's Introduction

Scala OpenStreetMap API

Join the chat at https://gitter.im/plasmap/plasmap Build Status Coverage Status License

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

Installation

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"

Usage

Parsing

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)

Serialization

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)

Performance

See the Benchmarks wiki page.

Contributing

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.

I want to talk to the manager!

plasmap-logo

We develop geow with λ at plasmap. Follow @plasmapio on twitter.

geow's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.