Skip to main content
Question

Converting JSON to SHP


Forum|alt.badge.img
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

4 replies

david_r
Celebrity
  • August 17, 2015
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

Forum|alt.badge.img
  • Author
  • August 17, 2015
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.)

david_r
Celebrity
  • August 18, 2015
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

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • August 19, 2015
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:

 

 

 

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings