[Mapbender-commits] r10003 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Dec 6 02:27:57 PST 2018


Author: armin11
Date: 2018-12-06 02:27:57 -0800 (Thu, 06 Dec 2018)
New Revision: 10003

Modified:
   trunk/mapbender/http/classes/class_iso19139.php
Log:
Fix CRS handling when parsing iso19139 files - now the central crs class will be used to support all three crs definitions: EPSG:XXX, urn:xxx, http.//opengis.net/XXX

Modified: trunk/mapbender/http/classes/class_iso19139.php
===================================================================
--- trunk/mapbender/http/classes/class_iso19139.php	2018-12-04 11:12:57 UTC (rev 10002)
+++ trunk/mapbender/http/classes/class_iso19139.php	2018-12-06 10:27:57 UTC (rev 10003)
@@ -19,6 +19,7 @@
 require_once(dirname(__FILE__)."/../../conf/isoMetadata.conf");
 require_once(dirname(__FILE__)."/class_connector.php");
 require_once(dirname(__FILE__)."/class_Uuid.php");
+require_once(dirname(__FILE__)."/class_crs.php");
 require_once(dirname(__FILE__) . "/class_propagateMetadata.php");
 require_once dirname(__FILE__) . "/../../tools/wms_extent/extent_service.conf";
 class Iso19139 {
@@ -498,8 +499,9 @@
 			$this->refSystem = $this->refSystem[0];
 			//parse codes to get EPSG:XXXXX TODO use other function to support other codes
 			//get last part of string separated by the colon symbol
-			$this->refSystem = explode(':',$this->refSystem);
-			$this->refSystem = "EPSG:".$this->refSystem[count($this->refSystem)-1];
+			$crsObject = new Crs($this->refSystem);
+			$epsgId = $crsObject->identifierCode;
+			$this->refSystem = "EPSG:".$epsgId;
 			//debug output of keywords:
 			/*$iKeyword = 0;
 			foreach($this->keywords as $keyword) {  



More information about the Mapbender_commits mailing list