Skip to main content


Because for publishing/distributing OpenStreenMap data size saving is looked, practically all OpenStreetMap datasets are using the PBF2 OpenStreetMap file format. This format has been designed to achieve good compression, but it is really complex to obtain an optimized way to process its content.

This library achieves two different goals:

  • Spark Connector: Polyglot Scala, Python, SQL and R Spark connector to query OSM Pbf files.
  • Core library: High performance Scala library to read OSM Pbf files as Scala Iterators.

Question and support?#

I'm doing my best, but keep in mind that this is an opensource project, developed for free.

If you need / want osm4scala (or Scala, BigData, Spark, Java, etc...) premium support, don't hesitate to contact me and contract my services.

For free community support, there are two channels:

  • If it is a technical question: Stackoverflow with the tag [osm4scala]. I will response asap. Please, try to be clear, adding simple examples to reproduce the error or whatever the problem is.
  • If it is suggestion, generic question or anything that does not fit in the Stackoverflow scope, the best options is Gitter. A message to my LinkedIn account is a good option as well.


All code has been released as OpenSource. The code is available at Github


Licensed under The MIT License (MIT)