Skip to main content
Hi

 

The Swedish Geological Survey (SGU) has been starting to share some of it's data as open data. Unfortunately some of the data is presented in JSON format, which I'm not fimiliar with. As I have understood it really is just a text format with georeferences. I would like to convert the files from JSON to SHP. The JSON-files can be found here http://resource.sgu.se/oppnadata/grundvatten/api/grundvattenforekomster/forekomster/2?vattenmyndighet=VH

 

 

If you could point me in the right direction to start convering them with FME I would be very happy.

 

BR Rob
Hi

 

 

JSON is simply Javascript object notation. I had a look at the link you provided, and I cannot determine if they're following a published standard like GeoJSON or not. Maybe it would be a good ide to start there, surely there is some documentation available on their website.

 

 

If they're using their own format, using a Creator followed by a HTTPCaller and some JSON*-transformers might be a good start.

 

 

David
Their documentation says GeoJSON. I have downloaded the file from their webpage and try to read it with the GeoJSON reader, but the reader doesn't show upp in the main window, only in the navigator. Should I do this in some other way?

 

I guess that because it is GeoJSON I can use the corresponding reader without a Creator, and by having the file locally I won't need the HTTPCaller, is this correct?

 

 

The ordinary JSON reader shows up and can read, but fails at outputing it correctly. (There are about 50+ attribute columns with "attributeXX" names.)
Hi

 

 

For what it's worth, I couldn't get the GeoJSON reader to work, either. FME doesn't create a feature type from that dataset.

 

 

Either it's a problem with the dataset (different version of GeoJSON, proprietary wrapper, etc) or a bug in FME.

 

 

You might want to consider contacting the data owners to see if they have any experience consuming the data using FME.

 

 

David
Hi,

 

I was wondering whats going on with this file so tried it myself.

 

I managed to get the features out of this strange Geojson file but I am not sure the representation is correct.

 

I would still follow Davids advice and in case you still want to know how I managed it see:

 

 

 

Reply