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

[ bsd3, library, streaming ] [ Propose Tags ]

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

[Skip to Readme]
Versions [RSS] [faq] 1.0.0,, 1.0.1, 1.0.2
Change log
Dependencies attoparsec (==0.13.*), base (>=4.8 && <5), bytestring, containers, resourcet (==1.2.*), streaming (==0.2.*), streaming-attoparsec (==1.0.*), streaming-bytestring (==0.1.*), text (==1.2.*), transformers, vector (==0.12.*), zlib (==0.6.*) [details]
License BSD-3-Clause
Copyright Copyright (c) 2017 - 2020 Azavea
Author Colin Woodbury
Category Streaming
Home page
Uploaded by fosskers at 2020-07-16T16:52:18Z
Distributions NixOS:1.0.2
Downloads 1354 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-07-16 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees


Readme for streaming-osm-1.0.2

[back to package description]


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