From 6b526174bf395d3e27e5ac41793602bc298fb552 Mon Sep 17 00:00:00 2001 From: paul van genuchten Date: Tue, 20 Dec 2022 17:08:00 +0100 Subject: [PATCH] add datatype section resolves #189 --- pygeometa/schemas/iso19139/__init__.py | 3 +++ tests/md-SMJP01RJTD-gmd.xml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pygeometa/schemas/iso19139/__init__.py b/pygeometa/schemas/iso19139/__init__.py index 2b9bbe0..318236b 100644 --- a/pygeometa/schemas/iso19139/__init__.py +++ b/pygeometa/schemas/iso19139/__init__.py @@ -172,6 +172,9 @@ def import_(self, metadata: str) -> dict: mcf['spatial']['resolution'].append({'distance': v, 'uom': uom}) + if m.identification.spatialrepresentationtype and len(m.identification.spatialrepresentationtype) > 0: # noqa + mcf['spatial']['datatype'] = m.identification.spatialrepresentationtype[0] # noqa + if m.identification.accessconstraints: mcf['identification']['accessconstraints'] = m.identification.accessconstraints[0] # noqa diff --git a/tests/md-SMJP01RJTD-gmd.xml b/tests/md-SMJP01RJTD-gmd.xml index e655a6d..73fee26 100644 --- a/tests/md-SMJP01RJTD-gmd.xml +++ b/tests/md-SMJP01RJTD-gmd.xml @@ -315,6 +315,9 @@ + + +