This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I've just started working with GeoJSON files, and I've been finding it very inconvenient to handle on Alteryx. I've gone through the following articles, but the general advice seems to be "just import it as a JSON and parse it", which isn't helpful if you're dealing with polygons rather than points.
Can I know if there's anything currently in Alteryx or in the development pipeline to make this process easier? For example, the sf package in R reads in the GeoJSON file into a dataframe format with the spatial attributes in a geometry column (basically parsing it automatically for you). Something similar could be implemented in Alteryx. Until then, I will have to stick to R for any spatial analytics work involving polygons.
One thing that will probably help is that the format for Alteryx Spatial Objects is a GeoJSON. So, if you have a properly formatted GeoJSON string, you can use the Select tool to convert it to Spatial Object, and it should convert it for you without any significant parsing.
Hi @StephenR, thanks for your reply! How should I import the GeoJSON file into Alteryx? I've used the JSON format in the Input Tool and used the Select tool to convert the JSON values to a SpatialObj but it still doesn't work.
Those files killed Notepad and Notepad++ so, I feel like there is something there that is causing problems for Alteryx too. I did notice that they are from 2016 which makes them pretty old files. If you need Zip code boundaries, I'd suggest getting the latest from the US Census in shapefile or geodatabase.
I've been searching for a solution to parsing GeoJson files extensively didn't come up with a native Alterix solution. I agree with you, it seems a tool would be appropriate to parse such files to spatial polygon clusters. As an alternative I created this workflow that parses the Geo.Json file of US Counties (courtesy Eric Celeste), and uses Regex tool to extract and reassemble feature elements to a table. It's not a native tool, but at least its not bootstrapping R. Pretty simple actually.
I took a shot at this and was able to get it working.
Not my most elegant solution, but basically I read the file in as a '}' delimited csv file, transposed the whole thing (as this created a huge amount of records), did some basic data prep and used a select tool to set the field type as a SpatialObject.