Question

Download OSM/Overpass data on the fly ?

  • 6 March 2018
  • 2 replies
  • 13 views

Badge +1

Hello,

I would like my FME script to download some data directly from OSM (probably using Overpass) when executed. At first I wanted to get the result from a specific Overpass QL request (using HttpCaller ?), but I don't know how to do that.

  • I have tried the OSMDownloader, but the resulting file has no geometry ... And even if it would work, how to wait for the file to be entirely written before reading it with a reader ? Or is there any other way to do that ?
  • I also tried a solution from friesewoudloper, but I don't understand the XSL template (XSLProcessor) and how to use it the way I want ...

Any help with that issue would be much appreciated :)

 

 

Thanks in advance


2 replies

Userlevel 4
Badge +13

HI @mickael,

you were sooo close! The OSMDownloader will wait until it's written the file is written before moving on. After the success port you can simple read in the downloaded file with a FeatureReader. I've tweaked it for you to try: 15437-test-osm-onthefly.fmw

 

 

Badge +1

HI @mickael,

you were sooo close! The OSMDownloader will wait until it's written the file is written before moving on. After the success port you can simple read in the downloaded file with a FeatureReader. I've tweaked it for you to try: 15437-test-osm-onthefly.fmw

 

0684Q00000ArKOwQAN.png

 

Hi Matt,

Thanks for help, the data inspector is showing me the data, but when I try to write the "Generic" output, it creates an empty file.

 

Plus, I really need to have a precise control on OSM data (that's why I tried OverPass Turbo), especially on relations, as the downloader here doesn't get me the "big" river on the extent (I assume it is too large to include all relations). Is there a way to do that on FME ? Or tutorials about this ?

 

So far I manage to get the "xml stream" in the an attribute with the HttpCaller, but then I am stuck. I thought I could link this with a FeatureReader, but then I get an error : 
Error running translation.

0684Q00000ArMWrQAN.png

Reply