From df28548903d8f7b131a90d140dcb0494b2ff20d0 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 | 4 ++++ tests/md-SMJP01RJTD-gmd.xml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/pygeometa/schemas/iso19139/__init__.py b/pygeometa/schemas/iso19139/__init__.py index fd63ebb..7215331 100644 --- a/pygeometa/schemas/iso19139/__init__.py +++ b/pygeometa/schemas/iso19139/__init__.py @@ -151,6 +151,10 @@ def import_(self, metadata: str) -> dict: mcf['spatial']['resolution'].append({'distance': v, 'uom': uom}) + if (m.identification.spatialrepresentationtype and + len(m.identification.spatialrepresentationtype) > 0): + 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 @@ + + +