Skip to main content

I did some easy tests on reading CityJSON and writing out the same data I just read in.

Reading was easy. Problems start when I try to write the data I just read in.

  1. I always get some error ffs with Feature types I don't understand and I don't know where they come from:

     

  2. The CityJSON file which is written cannot be read in again as a CityJSON fileCITYJSON reader: An error occurred. FME will attempt to provide more information on the error, but this may cause the translation to be terminatedRead Metadata Feature Command caught exception: stk::ex::FatalErrorr0] CITYJSON reader: json.exception.out_of_range.403] key 'boundaries' not foundd1] auto __cdecl STFReader::getFeature::<lambda_e8ad0c4de285582507d80bbbf97fb805>::operator ()(void) const(C:\\code\\fme\\foundation\\framework\\engine\\reader.cpp:61)

 

It is a tech preview, OK and I managed to write CityGML successfully.

Any guideline how to do this properly for CityJSON ?

Michael

 

 

 

As a tech preview there are a few tricks to getting CityJSON writing to work. The schema for this format is writer or dataset driven, so you can't just add user defined feature types and fields. When you add the writer, check the writer parameters and make sure the CityJSON version and starting schema are set correctly, such as version 1.0 and schema 1.0.1. Then you will get a list of feature types to select for adding to the workspace.

The next step is to add feature types one at a time and watch the log for errors. Every feature needs a fid feature id. Also you will need to ensure that every feature type has the correct geometry type as per the spec available at: https://www.cityjson.org/specs/1.0.1/ Finally, every geometry needs to have a valid cityjson_lod set.

Note that we updated the CityJSON reader/writer right up to the release - so please use the latest available FME 2020 release or 2021+ beta.

For more help with your specific translation please send your example workspace, source data, translation log with a description of the problem to or contact us Livechat or Report a Problem via: https://www.safe.com/support/


As a tech preview there are a few tricks to getting CityJSON writing to work. The schema for this format is writer or dataset driven, so you can't just add user defined feature types and fields. When you add the writer, check the writer parameters and make sure the CityJSON version and starting schema are set correctly, such as version 1.0 and schema 1.0.1. Then you will get a list of feature types to select for adding to the workspace.

The next step is to add feature types one at a time and watch the log for errors. Every feature needs a fid feature id. Also you will need to ensure that every feature type has the correct geometry type as per the spec available at: https://www.cityjson.org/specs/1.0.1/ Finally, every geometry needs to have a valid cityjson_lod set.

Note that we updated the CityJSON reader/writer right up to the release - so please use the latest available FME 2020 release or 2021+ beta.

For more help with your specific translation please send your example workspace, source data, translation log with a description of the problem to or contact us Livechat or Report a Problem via: https://www.safe.com/support/

I sent the necessary files and info to support, and referred to this article in the email I sent.


Reply