Question

Trying to deal with Waze malformed GeoJSON feed due to encoding. Handling line geometry.

  • 23 August 2022
  • 3 replies
  • 7 views

Ok so I have read that the Waze JSON feed is not formed correctly which stops FME from natively reading the GeoJSON with a reader. You have to use a httpcaller with the Accept-Encoding heading parameter. So I got the translation started but I have hit a snag with the line geometry for the JAMS and IRREGULARLITIES feature categories.

 

Here is our waze feed if anyone can get it to work properly with a reader instaed of a http caller.

https://www.waze.com/partnerhub-api/waze-feed-access-token/8065da30-c46e-4dee-937a-68b8dac4d2a0?format=1

 

I have attached a sample json txt file of our feed. The issue im having is I have paired the line features down to

{"x":-96.637385,"y":32.846625}{"x":-96.637275,"y":32.846417}{"x":-96.636865,"y":32.846035}{"x":-96.636524,"y":32.845655}{"x":-96.636179,"y":32.845214}{"x":-96.635502,"y":32.843905}{"x":-96.635225,"y":32.843463}

 

I need to convert that to a line either by creating vertices or something.

 

Im sorry this is so disjunct. My brain is pudding.


3 replies

So it seems I just needed to sleep on it. I just had to move my JSONFragmenter one step forward in my process. JSONFragmenter > JSON Fragmenter instead of JSONFragmenter > JSONExtractor. Because the line had nested X Y attributes I had to fragment it again.

 

If anyone can get that feed to work straight into a reader though Id love to see how.

Badge +14

Have you taken a look at this: https://github.com/runneals/GISProjects/tree/master/fme/waze It's from a few years ago, so it's possible that Waze changed their feed, but it's worth a look. Let me know if you have questions.

Have you taken a look at this: https://github.com/runneals/GISProjects/tree/master/fme/waze It's from a few years ago, so it's possible that Waze changed their feed, but it's worth a look. Let me know if you have questions.

I did see that. How do I download the .fmw file? All I can get to is the code. Nevermind I finally found the download zip button.

 

So looking at this it does handle the alerts category really well but does not handle the jams or irregularity categories which are line geometry. I think this was made back when they only exported the alert points or this user was only interested in the alert points.

 

Its a great workspace to draw inspiration from though.

Reply