Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fosskers/streaming-osm
A hand-written streaming byte parser for OpenStreetMap Protobuf data.
https://github.com/fosskers/streaming-osm
haskell openstreetmap streaming
Last synced: 2 months ago
JSON representation
A hand-written streaming byte parser for OpenStreetMap Protobuf data.
- Host: GitHub
- URL: https://github.com/fosskers/streaming-osm
- Owner: fosskers
- License: bsd-3-clause
- Created: 2017-03-20T16:49:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-12-08T21:54:13.000Z (about 3 years ago)
- Last Synced: 2024-05-01T23:24:03.160Z (8 months ago)
- Topics: haskell, openstreetmap, streaming
- Language: Haskell
- Homepage:
- Size: 833 KB
- Stars: 12
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# `streaming-osm`
This library provides the ability to read and process
[OpenStreetMap](http://www.openstreetmap.org/) data via the
[streaming](https://hackage.haskell.org/package/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:```haskell
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
```