Skip to main content

Hi!

I am converting GIS data to GeoJSON files. Currently the GeoJSON files are within the JSON file. Is it possible to separate the JSON file so I can see the GeoJSON files along with the JSON file. Essentially, it would look like the image attached.

Thank you for any help!

David

Hi @david_prosack88, looks like you attempt to create individual GeoJSON datasets corresponding to each feature type in the source GIS dataset. If so, I think you can directly create desired GeoJSON files using a GeoJSON writer with Fanout Dataset configuration. See here to learn more about the Fanout: Separating Output Data with Fanout

 

If you want to know a way to split an existing JSON document containing GeoJSON objects into individual GeoJSON parts anyway, please explain the structure of the JSON document specifically.


Hi @david_prosack88, looks like you attempt to create individual GeoJSON datasets corresponding to each feature type in the source GIS dataset. If so, I think you can directly create desired GeoJSON files using a GeoJSON writer with Fanout Dataset configuration. See here to learn more about the Fanout: Separating Output Data with Fanout

 

If you want to know a way to split an existing JSON document containing GeoJSON objects into individual GeoJSON parts anyway, please explain the structure of the JSON document specifically.

Thanks for the response @takashi. I've been trying to separate the GeoJSON files using the fanout dataset configuration, but I cannot get the expression to work. I tried separating by feature name, but I just get file extensions. How can I separate by extension? Such as .geojson.

 

 

Thanks,

 

David

 


Hi @david_prosack88, looks like you attempt to create individual GeoJSON datasets corresponding to each feature type in the source GIS dataset. If so, I think you can directly create desired GeoJSON files using a GeoJSON writer with Fanout Dataset configuration. See here to learn more about the Fanout: Separating Output Data with Fanout

 

If you want to know a way to split an existing JSON document containing GeoJSON objects into individual GeoJSON parts anyway, please explain the structure of the JSON document specifically.

You can set any file extension in the Fanout expression. For example, if an attribute called "fme_feature_type" stores your desired destination feature type name (i.e. file name without extension),  this Fanout expression should work as expected.

 

@Value(fme_feature_type).geojson

Reply