cityjson / cityjson-qgis-plugin

A QGIS plugin that adds support for CityJSON files
Apache License 2.0
35 stars 8 forks source link

The "metadata" object should not be required #26

Closed balazsdukai closed 4 years ago

balazsdukai commented 4 years ago

When loading a file the plugin tries to figure if a file has declared a crs from the presence of the "referenceSystem" key in the "metadata" object. However, if the file doesn't have a crs declared, the "metadata" object might be missing completely, and still be a valid file. See minimal valid CityJSON at https://www.cityjson.org/specs/1.0.1/#cityjson-object

Currently if "metadata" is not in the file, the plugin returns a KeyError. Instead of KeyError it should set an Undefined CRS in QGIS.

liberostelios commented 4 years ago

Problem was fixed, thanks to @Athelena. Will be available on the next release.