streaming-osm: A hand-written streaming byte parser for OpenStreetMap Protobuf data.

[ bsd3, library, streaming ] [ Propose Tags ] [ Report a vulnerability ]

A hand-written streaming byte parser for OpenStreetMap Protobuf data.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0, 1.0.0.1, 1.0.1, 1.0.2
Change log CHANGELOG.md
Dependencies attoparsec (>=0.13 && <0.14), base (>=4.8 && <5), bytestring, containers, resourcet (>=1.2 && <1.3), streaming (>=0.2 && <0.3), streaming-attoparsec (>=1.0 && <1.1), streaming-bytestring (>=0.1 && <0.2), text (>=1.2 && <1.3), transformers, vector (>=0.12 && <0.13), zlib (>=0.6 && <0.7) [details]
License BSD-3-Clause
Copyright Copyright (c) 2017 - 2020 Azavea
Author Colin Woodbury
Maintainer colin@fosskers.ca
Category Streaming
Home page https://github.com/fosskers/streaming-osm
Uploaded by fosskers at 2020-07-16T16:52:18Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1697 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-07-16 [all 1 reports]

Readme for streaming-osm-1.0.2

[back to package description]

streaming-osm

This library provides the ability to read and process OpenStreetMap data via the streaming ecosystem. Since streaming allows for very little RAM overhead despite file size, we can process very large OSM PBF files just by providing a file path:

import           Streaming
import           Streaming.Osm
import qualified Streaming.Prelude as S

-- | Count all nodes.
count :: IO ()
count = do
  len <- runResourceT . S.length_ . nodes . blocks $ blobs "yourfile.osm.pbf"
  print len