Closed kevinpdavies closed 9 years ago
@kevinpdavies thanks for the report. Can you provide the XML metadata so I can reproduce?
Thanks for the quick response @tomkralidis - I've pasted a full XML file.
<?xml version="1.0" encoding="UTF-8"?>
<!-- UNCLASSIFIED -->
<!-- Built from ANZLIC MET Template ISO 19139 2009-02-18 -->
<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://www.isotc211.org/2005/gmd/gmd.xsd http://www.opengis.net/gml http://www.isotc211.org/2005/gml/gml.xsd http://www.w3.org/1999/xlink http://www.isotc211.org/2005/xlink/xlinks.xsd">
<gmd:fileIdentifier>
<gco:CharacterString>FE807DBE-F446-422D-9738-77A6656995D7</gco:CharacterString>
</gmd:fileIdentifier>
<gmd:language>
<gco:CharacterString>eng</gco:CharacterString>
</gmd:language>
<gmd:characterSet>
<gmd:MD_CharacterSetCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#MD_CharacterSetCode" codeListValue="utf8">utf8</gmd:MD_CharacterSetCode>
</gmd:characterSet>
<gmd:hierarchyLevel>
<gmd:MD_ScopeCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/GAScopeCodeList.xml#MD_ScopeCode" codeListValue="dataset">dataset</gmd:MD_ScopeCode>
</gmd:hierarchyLevel>
<gmd:hierarchyLevelName>
<gco:CharacterString>dataset</gco:CharacterString>
</gmd:hierarchyLevelName>
<gmd:contact>
<gmd:CI_ResponsibleParty>
<gmd:individualName>
<gco:CharacterString>Kevin Davies</gco:CharacterString>
</gmd:individualName>
<gmd:organisationName>
<gco:CharacterString>University of Technology Sydney</gco:CharacterString>
</gmd:organisationName>
<gmd:positionName>
<gco:CharacterString>Spatial Data Manager</gco:CharacterString>
</gmd:positionName>
<gmd:contactInfo>
<gmd:CI_Contact>
<gmd:phone>
<gmd:CI_Telephone>
</gmd:CI_Telephone>
</gmd:phone>
<gmd:address>
<gmd:CI_Address>
<gmd:deliveryPoint gco:nilReason="missing">
<gco:CharacterString>
</gco:CharacterString>
</gmd:deliveryPoint>
<gmd:country>
<gco:CharacterString>Australia</gco:CharacterString>
</gmd:country>
</gmd:CI_Address>
</gmd:address>
</gmd:CI_Contact>
</gmd:contactInfo>
<gmd:role>
<gmd:CI_RoleCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#CI_RoleCode" codeListValue="owner">owner</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:contact>
<gmd:dateStamp>
<gco:Date>2015-08-06</gco:Date>
</gmd:dateStamp>
<gmd:metadataStandardName>
<gco:CharacterString>ANZLIC Metadata Profile: An Australian/New Zealand Profile of AS/NZS ISO 19115:2005, Geographic information - Metadata</gco:CharacterString>
</gmd:metadataStandardName>
<gmd:metadataStandardVersion>
<gco:CharacterString>1.1</gco:CharacterString>
</gmd:metadataStandardVersion>
<gmd:referenceSystemInfo>
<gmd:MD_ReferenceSystem>
<gmd:referenceSystemIdentifier>
<gmd:RS_Identifier>
<gmd:code>
<gco:CharacterString>EPSG::28355</gco:CharacterString>
</gmd:code>
</gmd:RS_Identifier>
</gmd:referenceSystemIdentifier>
</gmd:MD_ReferenceSystem>
</gmd:referenceSystemInfo>
<gmd:identificationInfo>
<gmd:MD_DataIdentification>
<gmd:citation>
<gmd:CI_Citation>
<gmd:title>
<gco:CharacterString>Lake Mulwala Aerial Photo 1941</gco:CharacterString>
</gmd:title>
<gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:Date>1941</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#CI_DateTypeCode" codeListValue="creation">creation</gmd:CI_DateTypeCode>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
<gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:Date>1941</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication">publication</gmd:CI_DateTypeCode>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
<gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:Date>1941</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#CI_DateTypeCode" codeListValue="revision">revision</gmd:CI_DateTypeCode>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
</gmd:CI_Citation>
</gmd:citation>
<gmd:abstract>
<gco:CharacterString>Aerial Photo of Lake Mulwala 1941.</gco:CharacterString>
</gmd:abstract>
<gmd:status>
<gmd:MD_ProgressCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#MD_ProgressCode" codeListValue="historicalArchive">historicalArchive</gmd:MD_ProgressCode>
</gmd:status>
<gmd:pointOfContact>
<gmd:CI_ResponsibleParty>
<gmd:individualName>
<gco:CharacterString>Kevin Davies</gco:CharacterString>
</gmd:individualName>
<gmd:organisationName>
<gco:CharacterString>University of Technology Sydney</gco:CharacterString>
</gmd:organisationName>
<gmd:positionName>
<gco:CharacterString>Spatial Data Manager</gco:CharacterString>
</gmd:positionName>
<gmd:contactInfo>
<gmd:CI_Contact>
<gmd:phone>
<gmd:CI_Telephone>
<gmd:voice gco:nilReason="missing">
<gco:CharacterString>
</gco:CharacterString>
</gmd:voice>
<gmd:facsimile gco:nilReason="missing">
<gco:CharacterString>
</gco:CharacterString>
</gmd:facsimile>
</gmd:CI_Telephone>
</gmd:phone>
<gmd:address>
<gmd:CI_Address>
<gmd:deliveryPoint gco:nilReason="missing">
<gco:CharacterString>
</gco:CharacterString>
</gmd:deliveryPoint>
<gmd:city gco:nilReason="missing">
<gco:CharacterString>
</gco:CharacterString>
</gmd:city>
<gmd:administrativeArea gco:nilReason="missing">
<gco:CharacterString>
</gco:CharacterString>
</gmd:administrativeArea>
<gmd:postalCode gco:nilReason="missing">
<gco:CharacterString>
</gco:CharacterString>
</gmd:postalCode>
<gmd:country>
<gco:CharacterString>Australia</gco:CharacterString>
</gmd:country>
<gmd:electronicMailAddress gco:nilReason="missing">
<gco:CharacterString>
</gco:CharacterString>
</gmd:electronicMailAddress>
</gmd:CI_Address>
</gmd:address>
</gmd:CI_Contact>
</gmd:contactInfo>
<gmd:role>
<gmd:CI_RoleCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#CI_RoleCode" codeListValue="owner">owner</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:pointOfContact>
<gmd:resourceMaintenance>
<gmd:MD_MaintenanceInformation>
<gmd:maintenanceAndUpdateFrequency>
<gmd:MD_MaintenanceFrequencyCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#MD_MaintenanceFrequencyCode" codeListValue="notPlanned">notPlanned</gmd:MD_MaintenanceFrequencyCode>
</gmd:maintenanceAndUpdateFrequency>
</gmd:MD_MaintenanceInformation>
</gmd:resourceMaintenance>
<gmd:resourceFormat xlink:type="simple">
<gmd:MD_Format>
<gmd:name>
<gco:CharacterString>*.tif</gco:CharacterString>
</gmd:name>
<gmd:version>
<gco:CharacterString>Unknown</gco:CharacterString>
</gmd:version>
</gmd:MD_Format>
</gmd:resourceFormat>
<gmd:descriptiveKeywords>
<gmd:MD_Keywords>
<gmd:keyword>
<gco:CharacterString>Victoria</gco:CharacterString>
</gmd:keyword>
<gmd:type>
<gmd:MD_KeywordTypeCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#MD_KeywordTypeCode" codeListValue="theme">theme</gmd:MD_KeywordTypeCode>
</gmd:type>
<gmd:thesaurusName>
<gmd:CI_Citation>
<gmd:title>
<gco:CharacterString>ANZLIC Jurisdictions</gco:CharacterString>
</gmd:title>
<gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:Date>2008-10-29</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#CI_DateTypeCode" codeListValue="revision">revision</gmd:CI_DateTypeCode>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
<gmd:edition>
<gco:CharacterString>Version 2.1</gco:CharacterString>
</gmd:edition>
<gmd:editionDate>
<gco:Date>2008-10-29</gco:Date>
</gmd:editionDate>
<gmd:identifier>
<gmd:MD_Identifier>
<gmd:code>
<gco:CharacterString>http://asdd.ga.gov.au/asdd/profileinfo/anzlic-jurisdic.xml#anzlic-jurisdic</gco:CharacterString>
</gmd:code>
</gmd:MD_Identifier>
</gmd:identifier>
<gmd:citedResponsibleParty>
<gmd:CI_ResponsibleParty>
<gmd:organisationName>
<gco:CharacterString>ANZLIC the Spatial Information Council</gco:CharacterString>
</gmd:organisationName>
<gmd:role>
<gmd:CI_RoleCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#CI_RoleCode" codeListValue="custodian">custodian</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:citedResponsibleParty>
</gmd:CI_Citation>
</gmd:thesaurusName>
</gmd:MD_Keywords>
</gmd:descriptiveKeywords>
<gmd:resourceConstraints>
<gmd:MD_LegalConstraints>
<gmd:useLimitation>
<gco:CharacterString>Kevin Davies, UTS</gco:CharacterString>
</gmd:useLimitation>
<gmd:accessConstraints>
<gmd:MD_RestrictionCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#MD_RestrictionCode" codeListValue="copyright">copyright</gmd:MD_RestrictionCode>
</gmd:accessConstraints>
</gmd:MD_LegalConstraints>
</gmd:resourceConstraints>
<gmd:resourceConstraints>
<gmd:MD_LegalConstraints>
<gmd:useLimitation>
<gco:CharacterString>Kevin Davies, UTS</gco:CharacterString>
</gmd:useLimitation>
<gmd:useConstraints>
<gmd:MD_RestrictionCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#MD_RestrictionCode" codeListValue="copyright">copyright</gmd:MD_RestrictionCode>
</gmd:useConstraints>
</gmd:MD_LegalConstraints>
</gmd:resourceConstraints>
<gmd:spatialRepresentationType>
<gmd:MD_SpatialRepresentationTypeCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#MD_SpatialRepresentationTypeCode" codeListValue="grid">grid</gmd:MD_SpatialRepresentationTypeCode>
</gmd:spatialRepresentationType>
<gmd:spatialResolution>
<gmd:MD_Resolution>
<gmd:distance>
<gco:Distance uom="m">5</gco:Distance>
</gmd:distance>
</gmd:MD_Resolution>
</gmd:spatialResolution>
<gmd:language>
<gco:CharacterString>eng</gco:CharacterString>
</gmd:language>
<gmd:characterSet>
<gmd:MD_CharacterSetCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#MD_CharacterSetCode" codeListValue="utf8">utf8</gmd:MD_CharacterSetCode>
</gmd:characterSet>
<gmd:topicCategory>
<gmd:MD_TopicCategoryCode>environment</gmd:MD_TopicCategoryCode>
</gmd:topicCategory>
<gmd:extent>
<gmd:EX_Extent>
<gmd:geographicElement>
<gmd:EX_GeographicBoundingBox>
<gmd:westBoundLongitude>
<gco:Decimal>146.118</gco:Decimal>
</gmd:westBoundLongitude>
<gmd:eastBoundLongitude>
<gco:Decimal>146.176</gco:Decimal>
</gmd:eastBoundLongitude>
<gmd:southBoundLatitude>
<gco:Decimal>-36.029</gco:Decimal>
</gmd:southBoundLatitude>
<gmd:northBoundLatitude>
<gco:Decimal>-35.995</gco:Decimal>
</gmd:northBoundLatitude>
</gmd:EX_GeographicBoundingBox>
</gmd:geographicElement>
</gmd:EX_Extent>
</gmd:extent>
</gmd:MD_DataIdentification>
</gmd:identificationInfo>
<gmd:distributionInfo>
<gmd:MD_Distribution>
<gmd:distributor>
<gmd:MD_Distributor>
<gmd:distributorContact>
<gmd:CI_ResponsibleParty> <gmd:individualName gco:nilReason="missing"> <gco:CharacterString></gco:CharacterString> </gmd:individualName> <gmd:organisationName> <gco:CharacterString>University of Technology Sydney</gco:CharacterString> </gmd:organisationName> <gmd:positionName gco:nilReason="missing"> <gco:CharacterString></gco:CharacterString> </gmd:positionName> <gmd:contactInfo> <gmd:CI_Contact> <gmd:phone> <gmd:CI_Telephone> <gmd:voice gco:nilReason="missing"> <gco:CharacterString></gco:CharacterString> </gmd:voice> <gmd:facsimile gco:nilReason="missing"> <gco:CharacterString></gco:CharacterString> </gmd:facsimile> </gmd:CI_Telephone> </gmd:phone> <gmd:address> <gmd:CI_Address> <gmd:deliveryPoint gco:nilReason="missing"> <gco:CharacterString></gco:CharacterString> </gmd:deliveryPoint> <gmd:city gco:nilReason="missing"> <gco:CharacterString></gco:CharacterString> </gmd:city> <gmd:administrativeArea gco:nilReason="missing"> <gco:CharacterString></gco:CharacterString> </gmd:administrativeArea> <gmd:postalCode gco:nilReason="missing"> <gco:CharacterString></gco:CharacterString> </gmd:postalCode> <gmd:country> <gco:CharacterString>Australia</gco:CharacterString> </gmd:country> <gmd:electronicMailAddress gco:nilReason="missing"> <gco:CharacterString></gco:CharacterString> </gmd:electronicMailAddress> </gmd:CI_Address> </gmd:address> </gmd:CI_Contact> </gmd:contactInfo> <gmd:role> <gmd:CI_RoleCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#CI_RoleCode" codeListValue="pointOfContact">pointOfContact</gmd:CI_RoleCode> </gmd:role></gmd:CI_ResponsibleParty>
</gmd:distributorContact>
</gmd:MD_Distributor>
</gmd:distributor>
</gmd:MD_Distribution>
</gmd:distributionInfo>
<gmd:dataQualityInfo>
<gmd:DQ_DataQuality>
<gmd:scope>
<gmd:DQ_Scope>
<gmd:level>
<gmd:MD_ScopeCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#MD_ScopeCode" codeListValue="dataset">dataset</gmd:MD_ScopeCode>
</gmd:level>
<gmd:levelDescription>
<gmd:MD_ScopeDescription>
<gmd:other>
<gco:CharacterString>dataset</gco:CharacterString>
</gmd:other>
</gmd:MD_ScopeDescription>
</gmd:levelDescription>
</gmd:DQ_Scope>
</gmd:scope>
<gmd:lineage>
<gmd:LI_Lineage>
<gmd:statement>
<gco:CharacterString>Image retrieved from http://ianluntecology.com/2012/08/14/growback-3-animals-in-the-trees/. Last retrieved 2016-06-02.
Georegistration (1 degree polynomial, 1:10000) performed by eResearch, UTS.</gco:CharacterString>
</gmd:statement>
</gmd:LI_Lineage>
</gmd:lineage>
</gmd:DQ_DataQuality>
</gmd:dataQualityInfo>
<gmd:metadataConstraints>
<gmd:MD_LegalConstraints>
<gmd:useLimitation>
<gco:CharacterString>Kevin Davies, UTS</gco:CharacterString>
</gmd:useLimitation>
<gmd:accessConstraints>
<gmd:MD_RestrictionCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#MD_RestrictionCode" codeListValue="copyright">copyright</gmd:MD_RestrictionCode>
</gmd:accessConstraints>
</gmd:MD_LegalConstraints>
</gmd:metadataConstraints>
<gmd:metadataConstraints>
<gmd:MD_LegalConstraints>
<gmd:useLimitation>
<gco:CharacterString>Kevin Davies, UTS</gco:CharacterString>
</gmd:useLimitation>
<gmd:useConstraints>
<gmd:MD_RestrictionCode codeList="http://asdd.ga.gov.au/asdd/profileinfo/gmxCodelists.xml#MD_RestrictionCode" codeListValue="copyright">copyright</gmd:MD_RestrictionCode>
</gmd:useConstraints>
</gmd:MD_LegalConstraints>
</gmd:metadataConstraints>
</gmd:MD_Metadata>
<!--METValidation=True-->
cc @jj0hns0n @capooti
Thanks @kevinpdavies. I'm able to reproduce the issue.
This behaviour is rooted in design decisions around metadata support during GeoNode 2.0 development. GeoNode's strategy for layer uploads with metadata is to parse and discard the uploaded metadata XML.
GeoNode's internal metadata model is a crosswalk/subset of vanilla ISO 19139, FGDC, and Dublin Core. Given the complexity of the ISO standard, we kept the GeoNode metadata model generic to cover common use cases / workflows.
When a layer upload includes a ISO/FGDC/Dublin Core XML, the following happens:
CSW metadata export is subsequently driven off the GeoNode internal metadata model. The metadata XML that was provided with the layer upload is discarded.
GeoNode keeps track whether a layer was originally populated with a metadata upload and will display the following message as a reminder in the metadata edit form:
Note: this layer's original metadata was populated by importing a metadata XML file. GeoNode's metadata import supports a subset of ISO, FGDC, and Dublin Core metadata elements. Some of your original metadata may have been lost.
In both workflows, GeoNode will create a vanilla ISO document, store it and send it to the CSW backend. So the same issue will result whether the backend is pycsw (in which case binds directly to the GeoNode internal metadata model), GeoNetwork, or deegree.
Perhaps we can have the following enhancements which support preserving upstream metadata management:
elementsetname=full
will return the full, preserved, as-is, original metadata XML which was provided with the layer uploadWhat do folks think?
I am +1 to "provide checkbox in layer upload form which forces the uploaded metadata XML to be preserved, instead of the default behaviour ## Layer Metadata Editing" Not sure what you exactly mean with "provide a file upload form control which can be used instead of the default behaviour, along with checkbox to force preserve": could you clarify? thanks @tomkralidis
@capooti thanks. To clarify, when a user clicks 'edit metadata', currently they get the metadata entry form. Suggestion is to also provide a file upload form if they wish to edit their metadata by uploading a metadata XML again. Does this make sense?
definitely, and I think this would be very useful! +1 (not related here, but we would need another upload form for sld style within the layer details page)
would it be possible to add an option to importlayers to preserve the XML metadata too?
@gdreich good idea. I will add this once the UI workflow is implemented and locked down.
@kevinpdavies FYI I have this working locally. Can you review/comment on the new proposed workflow?
Thanks @tomkralidis yes the proposed workflow looks good. Could I also request that the command line 'importlayers' has the same option (i.e. preserve the XML) please? Also, if there is an SSID present in the XML will this be preserved? If not, would it be possible to have a 'preserve SSID' option in both the command line tool and user interface? Thanks for addressing this issue so quickly.
@kevinpdavies I've added this to importlayers
as well via -m
or --metadata_uploaded_preserve
boolean argument.
What do you mean by preserve SSID
?
Sorry @tomkralidis I used the wrong term. I should have said the unique file identifier e.g.
<gmd:fileIdentifier>
<gco:CharacterString>FE807DBE-F446-422D-9738-77A6656995D7</gco:CharacterString>
</gmd:fileIdentifier>
Hi @kevinpdavies thanks for the info. Yes, this is part of #2297. The unique file identifier will persist as part of the new workflow when preserve metadata is checked.
@tomkralidis can we close this now?
@jj0hns0n after 2.5
@kevinpdavies this is now landed in master. Feel free to reopen this ticket if there are issues with the new feature. Thanks for the feedback and testing!
I upload an image and an associated ISO19139 xml file. The file contains a gmd:contact element (attached below). This file uploads OK. However, when I try to "Download Metadata" and choose the "ISO" option, nearly all the contact information has "missing" in the fields (email address is the only exception). Output is also attached below. I haven't checked how much ISO19139 data is not being returned (or being saved). I am aware that geonode is not saving the full ISO19139 set but there seems to be an inconsistency here. It has been suggested to me that I should have used Geonetwork as it faithfully uploads and returns the full ISO19139 record. Would using Geonetwork as the backend catalogue service improve the handling of ISO19139 in Geonode?
An excerpt from the input metadata:
An excerpt from the "Download Metadata" / "ISO" option: