From 8221189a4a6ad16c02303d4386dc5c2d2ac218ff Mon Sep 17 00:00:00 2001 From: amercader Date: Fri, 14 Mar 2014 14:12:05 +0000 Subject: [PATCH] [#62] Fix spatial-resolution parsing --- ckanext/spatial/model/harvested_metadata.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ckanext/spatial/model/harvested_metadata.py b/ckanext/spatial/model/harvested_metadata.py index a2f2463..412fbd5 100644 --- a/ckanext/spatial/model/harvested_metadata.py +++ b/ckanext/spatial/model/harvested_metadata.py @@ -691,19 +691,19 @@ class ISODocument(MappedXmlDocument): ISOElement( name="spatial-resolution", search_paths=[ - "gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:distance/gco:Distance", - "gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:distance/gco:Distance", + "gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:distance/gco:Distance/text()", + "gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:distance/gco:Distance/text()", + ], + multiplicity="0..1", + ), + ISOElement( + name="spatial-resolution-units", + search_paths=[ + "gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:distance/gco:Distance/@uom", + "gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:distance/gco:Distance/@uom", ], multiplicity="0..1", ), - #ISOElement( - # name="spatial-resolution-units", - # search_paths=[ - # "gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:distance/gco:Distance/@uom", - # "gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:distance/gco:Distance/@uom", - # ], - # multiplicity="0..1", - #), ISOElement( name="equivalent-scale", search_paths=[