From dbfb41ed0e4cfa027edeb2f7337a8fa7d50f29db Mon Sep 17 00:00:00 2001 From: Francesco Frassinelli Date: Tue, 27 Dec 2022 15:55:52 +0100 Subject: [PATCH] Add useLimitation --- pygeometa/schemas/iso19139/__init__.py | 3 +++ pygeometa/schemas/iso19139/main.j2 | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/pygeometa/schemas/iso19139/__init__.py b/pygeometa/schemas/iso19139/__init__.py index 47e4198..4317da0 100644 --- a/pygeometa/schemas/iso19139/__init__.py +++ b/pygeometa/schemas/iso19139/__init__.py @@ -138,6 +138,9 @@ def import_(self, metadata: str) -> dict: mcf['identification']['extents']['temporal'].append(temp_extent) + if m.identification.uselimitation: + mcf['identification']['uselimitation'] = m.identification.uselimitation + if m.identification.accessconstraints: mcf['identification']['accessconstraints'] = m.identification.accessconstraints[0] # noqa diff --git a/pygeometa/schemas/iso19139/main.j2 b/pygeometa/schemas/iso19139/main.j2 index efc8ecd..b365c74 100644 --- a/pygeometa/schemas/iso19139/main.j2 +++ b/pygeometa/schemas/iso19139/main.j2 @@ -239,6 +239,11 @@ {% endfor %} + {% if record['identification']['uselimitation'] %} + + {{ record['identification']['uselimitation'] }} + + {% endif %} {{ record['identification']['accessconstraints'] }}