[Angel Cervera Claudio is the author of the library. I'm not the
author and only copy&paste his announcement]

https://www.linkedin.com/pulse/osm4scala-v10-angel-cervera-claudio

osm4scala v1.0

Few days ago, I released the first version of osm4scala. A library used to iterate easily over Open Street Map entities stored in a osm.pbf file.

I implemented a library to iterate over all entities easily, hiding all difficult of decoding, and with the powerful of the Scala Iterator. For example, to generate an iterator and count all elements of type "Node", it is so simple as:

EntityIterator.fromPbf(inputStream).count(_.osmModel == OSMTypes.Node)

Its performance surprised me.

For example, iterate over a the full planet data set with (near of 4,000 millions of elements and 39GB) stored in a external USB3 drive and using only one thread takes only 40 minutes.

Other example is the iteration over all data of Spain: 32 seconds to iterate over near of 70 millions of elements

More information:

    GitHub: https://github.com/angelcervera/osm4scala

    Example: Tag extraction
http://github.com/angelcervera/osm4scala/blob/v1.0/examples/tagsextraction/src/main/scala/com/acervera/osm4scala/examples/tagsextraction/TagExtraction.scala

    Example: Block extraction
http://github.com/angelcervera/osm4scala/blob/v1.0/examples/blocksextraction/src/main/scala/com/acervera/osm4scala/examples/blocksextraction/BlocksExtraction.scala

    Example: Entities type counter
http://github.com/angelcervera/osm4scala/blob/v1.0/examples/counter/src/main/scala/com/acervera/osm4scala/examples/counter/Counter.scala

    Example: Primitives extraction
http://github.com/angelcervera/osm4scala/blob/v1.0/examples/primitivesextraction/src/main/scala/com/acervera/osm4scala/examples/primitivesextraction/PrimitivesExtraction.scala


_______________________________________________
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev

Reply via email to