community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Downloading and working with GeoJSON

Comet

I am trying to download GeoJSON. When I google search or search the community everything that I am seeing says to select the GeoJSON file type in the input tool, but most of those posts are many years old and I am not seeing that file type. Do I just need to parse it like JSON and somehow use the data to build the spatial object?

 

Here is one of the files I am working with: https://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/pr2018360015.geojson . I am downloading another GeoJSON file related to earthquakes and within that file contains a link similar to this one with additional details.

 

Any help is appreciated!!!

It depends on  what you want to do with it - if just get the point out as a spatial point then I believe you can just cast to a SpatialObj using a select tool

 2018-12-28_18-28-46.png

 

If you need additional data then you can use the ParseJSON tool to get additional fields out.

 

Simple sample parsing the spatial point attached

Comet

That is helpful and works very well with a point. I happen to be dealing with all kinds of catastrophic event data so I tried it with a few other GeoJSON files. It doesn't seem to work with a multi-polygon like in this flood data: http://origin.wpc.ncep.noaa.gov/nationalfloodoutlook/occurring.geojson ....would this type just be easier to parse out with a JSON parse and after a bit more data cleansing create points and then use the poly build tool?

 

I am still fairly new to spatial data, so any and all assistance is truly appreciated!

Highlighted

I think it is that it can't cope with a FeatureCollection.

 

I implemented the following:

 

2018-12-28_22-45-03.png

 

Basically this uses a JSON parse to get the type field if it is a FeatureCollection then it breaks into separate features and rebuilds the JSON.

 

This seems to cope with the two examples you gave

 

Sample attached

Labels