Support jsonld for items with null geometry (#1423)

* - added condition to avoid doing operations on the geometry, when the geometry is null (case of records)

* - moving id out of the geometry condition

* - removed commented line

---------

Co-authored-by: doublebyte1 <info@doublebyte.net>
This commit is contained in:
Jo
2023-12-10 12:00:18 +00:00
committed by GitHub
parent f1a0357478
commit e7264e89bc
+4 -2
View File
@@ -211,8 +211,10 @@ def geojson2jsonld(cls, data: dict, dataset: str,
data.update(data.pop('properties'))
# Include multiple geometry encodings
data['type'] = 'schema:Place'
jsonldify_geometry(data)
if (data.get('geometry') is not None):
data['type'] = 'schema:Place'
jsonldify_geometry(data)
data['@id'] = identifier
else: