Package: cityjson2jsonfg
CityJSON to JSON-FGA command line tool for converting CityJSON files to JSON-FG format.JSON-FGstands forOGC Features and Geometries JSON, which is (currently) a candidate standard.
JSON-FG extends GeoJSON to support a wider range of use cases.
Forcityjson2jsonfgthe most important capability of JSON-FG is 3D data storage, sinceCityJSONis a 3D spatial data format.
CityJSON is a JSON-based encoding for storing 3D city models, also called digital maquettes or digital twins.Supported versions:CityJSON: 1.1JSON-FG: 0.1InstallationRequired python: >= 3.8Additionally, you need a relatively new version ofpipandsetuptoolsthat supports building frompyproject.tomlfiles.You can installcityjson2jsonfgwith pip.pipinstallcityjson2jsonfgUsageConvert a single CityJSON file to JSON-FG.cityjson2jsonfg<input.city.json><output.fg.json>See the help menu and the tool versioncityjson2jsonfg--help
cityjson2jsonfg--versionPipe from cjiocjiois a CLI tool for manipulating 3D city models that are stored in CityJSON files.
You can pipe cjio's output directly intocityjson2jsonfgwithout saving an intermedate file.
This is particularly useful if you want to modify the citymodel before the conversion.
For instance, upgrade the CityJSON file to v1.1 and then convert it to JSON-FG.cjio--suppress_msg<input.city.json>upgradesavestdout|cityjson2jsonfg-<output.fg.json>LimitationsVersion 1.0 was primarily developed to convert CityJSON files of the Dutch3D BAGand3D Basisvoorzieningdata sets.
Conversion from other data sets might not work.Converted dataA subset of the 3D BAG and 3D Basisvoorziening is available athttps://data.3dgi.xyz/jsonfg.
Both the source and converted files are provided.CityJSON --> JSON-FG conversion tableNot all the information contained in a CityJSON document can be represented by JSON-FG.
Therefore, some information can be lost in the conversion.
Below is a mapping of the CityJSON concepts to JSON-FG as it is implemented incityjson2jsonfg.CityJSONJSON-FGMultiple LoDs in one CityObject, each from a different family eg. (0, 1.3, 2.2).If the CityObject has a geometry with LoD < 0.2, this geometry is assumed to be 2.5D and added as GeoJSON geometry to"geometry". If the rest of the geometries are LoD >= 1, then the geometry with the highest LoD is added as JSON-FG geometry to"place".Multiple LoDs in one CityObject, each from the same family eg. (1.1, 1.3).The geometry with the highest LoD is added to the feature.City model creation date inCityJSON.metadata.referenceDate.Assigned as an instant time totime.dateasfull-date.Semantic surfacesNot converted.AppearancesNot converted.Metadata (other thanreferenceDateandreferenceSystem)Not converted.CityObject hierarchy (parent and children relations)Not converted.CommunicationAll work takes place in the current GitHub repository.
The primary channel for communication is theGitHub Discussions.
Feel free to ask questions you’re wondering about, share ideas and engage with other community members.ContributingContributions to the project are very welcome!
You could help with testing, documentation, bug reports, bug fixes, implementing new features and more.
Please read theCONTRIBUTING.mdon how to get started.FundingVersion 1.0 was funded byGeonovum.