Skip to main content
Released

Reader for OSM data in pbf format

Related products:FME Form
  • December 8, 2015
  • 14 replies
  • 131 views

jdh
Contributor
Forum|alt.badge.img+40

I would love the ability to read OSM data in pbf rather than xml format http://wiki.openstreetmap.org/wiki/PBF_Format

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

14 replies

embeezy
Participant
Forum|alt.badge.img+7
  • Participant
  • March 23, 2016

This is something we could use big time as OSM is the most important source for us in any time of crisis.


jdh
Contributor
Forum|alt.badge.img+40
  • Author
  • Contributor
  • March 23, 2016

@mb_fdfa I do have an inelegant solution using scripted paramters and OSMConvert where there is a published parameter (Filename (Existing) with a configuration of *.pbf;*.osm;*.o5m;*.osm.gz and the OSM reader points to a scripted parameter. Mine is more complicated with filtering and clipping options, but it boils down to

 

 

import os.path import subprocess

 

#get parameters

 

inOSM = FME_MacroValues['OSM']

 

toolsDir = FME_MacroValues['OSMTools']

 

 

#get osm basename

 

(filepath, ext) = os.path.splitext(inOSM)

 

 

#create temp output file

 

outOSM = filepath + '-temp.osm'

 

 

#Create and run OSMconvert command line

 

runP = toolsDir+'/osmconvert ' + inOSM + ' -o=' + outOSM

 

subprocess.call(runP)

 

 

#return temp filename

 

return outOSM

fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • June 14, 2016

File size differences are huge (11GB in pbf, 171GB in XML) this would really save some space/processing if we could get the pbf format.


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • August 8, 2016

@jdh @d2 @mb_fdfa -- I can advise that an Open Street Map PBF Reader has been in FME 2017 betas since build 17037 -- we've had no feedback on it yet and so would definitely welcome some. Thanks for your interest!


jdh
Contributor
Forum|alt.badge.img+40
  • Author
  • Contributor
  • August 16, 2016
Are there plans to allow for common osm feature types like those available in the osm reader (highway, waterway, natural, etc), or will it only support data primitives (nodes, ways, relations).

 

 


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • August 19, 2016
Thanks for the feedback. To be clear, you'd prefer the features be emitted with feature types more like the OSM reader? We'll look and see what we can do -- it does seem very reasonable.

 

 


jdh
Contributor
Forum|alt.badge.img+40
  • Author
  • Contributor
  • August 19, 2016
The osm reader has a parameter as to whether to use basic (node/way/relation), broad (highway), specific (highway_primary) or user defined (fmi pipeline file).

 

 

The pbf reader uses the gdal osm config .ini, which produces nodes/way/relations. Even something like offering alternate config files with the distribution would be beneficial*, though my preference would be a parameter.

 

 

*Most of my users would not be able to create a custom config file.

 

 


  • December 22, 2016
Will there be a pbf writer as well?

 

 


Forum|alt.badge.img
  • January 10, 2017
Is there a way to try this reader in FME 2016 already?

fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • January 10, 2017
You need to grab FME 2017 betas to try it, but these can co-exist with FME 2016.

fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • January 19, 2017

 

No plans at the current time for a PBF writer. Feel free to suggest as an Idea so we can track interest.

embeezy
Participant
Forum|alt.badge.img+7
  • Participant
  • January 31, 2017
Finally I have FME 2017 on my main Workstation and can try the new reader. Thanks, great it is there!

 

Although I haven't been able to try any real scenarios yet, I think that the suggestion from @jdh would be a useful enhancement.

 

 


Forum|alt.badge.img+1

This has been released as part of FME 2017.0 . Visit http://www.safe.com/downloads to download it and give it a spin.


brianatsafe
Safer
Forum|alt.badge.img+13
  • Safer
  • November 14, 2017
Hi @jdh,

 

 

I'm pleased to let you know that the 2018.0 version of the now reader allows you to choose from the 26 broad categories and its sub categories (via OSM Map Features), which are represented as feature types similar to the OSM XML reader.

 

 

Let us know how it looks!