@@ -897,8 +897,8 @@ def item(self, headers_, args, collection, item):
897
897
if headers_ ['Content-Type' ] == 'text/html' :
898
898
response ['title' ] = self .config ['metadata' ]['identification' ]['title' ]
899
899
response ['collection' ] = collection
900
- response ['schema-org' ] = record2json (record , self . config [ 'server' ][ 'url' ],
901
- collection , 'schema-org' )
900
+ response ['schema-org' ] = record2json (
901
+ record , self . config [ 'server' ][ 'url' ], collection , 'schema-org' )
902
902
903
903
if 'json' in headers_ ['Content-Type' ]:
904
904
headers_ ['Content-Type' ] = 'application/geo+json'
@@ -1417,6 +1417,14 @@ def record2json(record, url, collection, mode='ogcapi-records'):
1417
1417
for t in schema_org .pop ('themes' ,[]):
1418
1418
for c in t .get ('concepts' ,[]):
1419
1419
schema_org ['keywords' ].append (c .get ('url' ) or c .get ('id' ))
1420
+ if record .wkt_geometry :
1421
+ minx , miny , maxx , maxy = wkt2geom (record .wkt_geometry )
1422
+ schema_org ['spatialCoverage' ] = {
1423
+ '@type' : 'schema:Place' ,
1424
+ 'geo' : {
1425
+ '@type' : 'schema:GeoShape' ,
1426
+ 'box' : f'{ miny } ,{ minx } { maxy } ,{ maxx } ' }}
1427
+ schema_org .pop ('geometry' , None )
1420
1428
schema_org ['inLanguage' ] = schema_org .pop ('language' , None )
1421
1429
schema_org ['dateModified' ] = schema_org .pop ('updated' , None )
1422
1430
schema_org ['dateCreated' ] = schema_org .pop ('created' , None )
0 commit comments