4

I have a webmap of bike stations and there is a json service for these stations behind the map.

Is it possible to provide this URL as the source dataset, using FME Desktop?

Does FME Desktop support real-time data applications?

I need to be able to access the URL and write a workbench that would capture the bike station status in 5 minutes increments and put the results in a .csv ot .txt file.

Any ideas?

closed as too broad by PolyGeo Jan 13 '18 at 5:39

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

3

Here is an older workspace reading json from our google geocoder (we have enterprise license to do this).

The process is simple it sends a request out to the service [most api's will return json or xml] which returns the json file which then will be processed and reformatted

Note:we had to use a decelerator transformer because FME was processing the inputs too fast to the api service (blocks if too fast) 0.5 second delay worked for get the responses back.

enter image description here

Update you need a creator first with a Null value (you populate this later)

httpcaller (fetcher) is the json file your are calling from the web

JSONfragmentor (exploder) will get the json info

You will need to break the response up into attributes then you can create points, lines, polygons from the data you have extracted.

this is the file it is retrieving in json format

http://maps.google.com/maps/api/directions/json?origin=41.88,-87.62&destination=29.75,-95.36&sensor=true&mode=driving

enter image description here

Update2 your data is in GeoJSON (not json) use the GeoJSON reader in FME 2015 like this enter image description here

  • Thank you for your answer. I still don't understand what goes into the HTTPFletcher, since I need to specify the source URL inside this transformer. What do I need to link HTTP Fletcher from? Thanks – Fflavioo Apr 23 '15 at 19:27
  • 1
    see the update above based on you comments need to have a creator first then request the json from the web as GET request – Mapperz Apr 23 '15 at 19:52
  • Thank you very much Mapperz, I have an idea now, even if I'm getting an error...but, I am sure can figure it out myself :) Thanks – Fflavioo Apr 23 '15 at 21:08
  • I installed the FME 2015 version and still getting HTTPCaller <Rejected> and have no idea why.This is the file it is retrieving the json: rideindego.com/stations/json – Fflavioo Apr 27 '15 at 18:18
  • use the GeoJSON reader - I read in 71 features in the Philadelphia area. see update 2 – Mapperz Apr 27 '15 at 18:39
2

As for the automation part - "5 minutes increments" - that's usually what FME Server is used for. However, you could use a tool or script of some sort to simply run your workspace from the command line at set intervals (or a cron command if you're on on linux)

When you run the workspace in Workbench, the very top lines of the log window will tell you what the command will be to run the workspace on the command line.

  • I followed the structure suggested by Mapperz, but I'm still getting an error saying: "JSONFragmenter: A JSON syntax error was found at line 1. The JSON data is incomplete: Unexpectedly encountered the end of JSON data." For the automation part, we don't have FME Server, but we will in a few weeks, the Server and the Cloud. Thank you for your suggestion to run my workbench from the command line, I can try Windows Task Scheduler. – Fflavioo Apr 27 '15 at 14:02
  • use the GeoJSON reader - I read in 71 features in the Philadelphia area. – Mapperz Apr 27 '15 at 18:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.