Skip to content

Commit 204c1dd

Browse files
kalxastomkralidis
authored andcommitted
Parse gsd as float
1 parent 5838631 commit 204c1dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pycsw/core/metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,7 +1836,7 @@ def _parse_stac_resource(context, repos, record):
18361836
if instruments is not None:
18371837
_set(context, recobj, 'pycsw:Instrument', ','.join(instruments))
18381838
if record['properties'].get('gsd') is not None:
1839-
_set(context, recobj, 'pycsw:DistanceValue', record['properties']['gsd'])
1839+
_set(context, recobj, 'pycsw:DistanceValue', float(record['properties']['gsd']))
18401840
_set(context, recobj, 'pycsw:DistanceUOM', 'm')
18411841
if record.get('geometry') is not None:
18421842
bbox_wkt = util.bbox2wktpolygon(util.geojson_geometry2bbox(record['geometry']))
@@ -1855,7 +1855,7 @@ def _parse_stac_resource(context, repos, record):
18551855
if instruments is not None:
18561856
_set(context, recobj, 'pycsw:Instrument', ','.join(instruments))
18571857
if record.get('gsd') is not None:
1858-
_set(context, recobj, 'pycsw:DistanceValue', record['gsd'])
1858+
_set(context, recobj, 'pycsw:DistanceValue', float(record['gsd']))
18591859
_set(context, recobj, 'pycsw:DistanceUOM', 'm')
18601860
if 'extent' in record and 'spatial' in record['extent']:
18611861
bbox_csv = ','.join(str(t) for t in record['extent']['spatial']['bbox'][0])

0 commit comments

Comments
 (0)