[Mapbender-commits] r9882 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Mar 14 08:09:25 PDT 2018
Author: armin11
Date: 2018-03-14 08:09:24 -0700 (Wed, 14 Mar 2018)
New Revision: 9882
Modified:
trunk/mapbender/http/php/mod_dataISOMetadata.php
Log:
fix some dataset metadata problems for new inspire tg
Modified: trunk/mapbender/http/php/mod_dataISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_dataISOMetadata.php 2018-03-05 16:13:56 UTC (rev 9881)
+++ trunk/mapbender/http/php/mod_dataISOMetadata.php 2018-03-14 15:09:24 UTC (rev 9882)
@@ -658,7 +658,25 @@
$MD_DataIdentification=$iso19139->createElement("gmd:MD_DataIdentification");
$MD_DataIdentification->setAttribute("id", "spatial_dataset_".md5($mb_metadata['uuid']));
+ //add http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_SpatialRepresentationTypeCode
+ /*<gmd:spatialRepresentationType>
+<gmd:MD_SpatialRepresentationTypeCode
+codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_SpatialRepresentati
+onTypeCode"
+codeListValue="vector" />
+</gmd:spatialRepresentationType>*/
+ $spatialRepresentationType=$iso19139->createElement("gmd:spatialRepresentationType");
+ $MD_SpatialRepresentationTypeCode=$iso19139->createElement("gmd:MD_SpatialRepresentationTypeCode");
+ $MD_SpatialRepresentationTypeCode->setAttribute("codeList", "http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_SpatialRepresentationTypeCode");
+ if (in_array($mb_metadata['format'], array("GeoTIFF"))) {
+ $MD_SpatialRepresentationTypeCode->setAttribute("value", "grid");
+ } else {
+ $MD_SpatialRepresentationTypeCode->setAttribute("value", "vector");
+ }
+ $spatialRepresentationType->appendChild($MD_SpatialRepresentationTypeCode);
+ $MD_DataIdentification->appendChild($spatialRepresentationType);
+
$citation=$iso19139->createElement("gmd:citation");
$CI_Citation=$iso19139->createElement("gmd:CI_Citation");
@@ -1436,14 +1454,26 @@
$MD_FormatNameText=$iso19139->createTextNode($mb_metadata['format']);
$gmd_version=$iso19139->createElement("gmd:version");
- $MD_FormatVersion_cs=$iso19139->createElement("gco:CharacterString");
- $MD_FormatVersionText=$iso19139->createTextNode("unkown");
+ //add attribute
+ $gmd_version->setAttribute("gco:nilReason", "unknown");
+ //$MD_FormatVersion_cs=$iso19139->createElement("gco:CharacterString");
+ //$MD_FormatVersionText=$iso19139->createTextNode("unkown");
+
+ $gmd_specification=$iso19139->createElement("gmd:specification");
+ $MD_FormatSpecification_cs=$iso19139->createElement("gco:CharacterString");
+ /*TODO: the following entry should handle the TG data spec (D2.8.I.5 Data Specification on Addresses – Technical
+Guidelines) if conformant datasets are published TBD*/
+ $MD_FormatSpecificationText=$iso19139->createTextNode("Specification unkown");
+
$MD_FormatName_cs->appendChild($MD_FormatNameText);
- $MD_FormatVersion_cs->appendChild($MD_FormatVersionText);
+ //$MD_FormatVersion_cs->appendChild($MD_FormatVersionText);
+ $MD_FormatSpecification_cs->appendChild($MD_FormatSpecificationText);
$gmd_name->appendChild($MD_FormatName_cs);
- $gmd_version->appendChild($MD_FormatVersion_cs);
+ //$gmd_version->appendChild($MD_FormatVersion_cs);
+ $gmd_specification->appendChild($MD_FormatSpecification_cs);
+
//$gmd_name->setAttribute("gco:nilReason", "inapplicable");
//$gmd_version->setAttribute("gco:nilReason", "inapplicable");
@@ -1460,7 +1490,7 @@
$downloadUrl = $downloadUrls->downloadLinks[0]->{0};
//
if ($downloadUrl == "" || !isset($downloadUrl)) {
- $gmd_URLText=$iso19139->createTextNode("http://dummydownloadurl.domain");
+ $gmd_URLText=$iso19139->createTextNode("https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol");
}
else {
$gmd_URLText=$iso19139->createTextNode($downloadUrl);
@@ -1475,6 +1505,7 @@
$MD_Format->appendChild($gmd_name);
$MD_Format->appendChild($gmd_version);
+ $MD_Format->appendChild($gmd_specification);
$gmd_distributionFormat->appendChild($MD_Format);
More information about the Mapbender_commits
mailing list