[mapserver-commits] r7514 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Apr 10 01:05:15 EDT 2008
Author: warmerdam
Date: 2008-04-10 01:05:15 -0400 (Thu, 10 Apr 2008)
New Revision: 7514
Modified:
trunk/mapserver/mapfile.c
Log:
add simple CRS84 urn support
Modified: trunk/mapserver/mapfile.c
===================================================================
--- trunk/mapserver/mapfile.c 2008-04-10 05:03:52 UTC (rev 7513)
+++ trunk/mapserver/mapfile.c 2008-04-10 05:05:15 UTC (rev 7514)
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id:$
+ * $Id$
*
* Project: MapServer
* Purpose: High level Map file parsing code.
@@ -1116,6 +1116,35 @@
p->numargs = 2;
}
}
+ else if (strncasecmp(value, "urn:ogc:def:crs:OGC:",20) == 0 )
+ { /* this is very preliminary urn support ... expand later */
+ char init_string[100];
+ const char *id;
+
+ id = value + 20;
+ while( *id != ':' && *id == '\0' )
+ id++;
+
+ if( *id == ':' )
+ id++;
+
+ init_string[0] = '\0';
+
+ if( strcasecmp(id,"CRS84") == 0 )
+ strcpy( init_string, "init=epsg:4326" );
+ else
+ {
+ msSetError( MS_PROJERR,
+ "Unrecognised OGC CRS def '%s'.",
+ "msLoadProjectionString()",
+ value );
+ return -1;
+ }
+
+ p->args = (char**)malloc(sizeof(char*) * 2);
+ p->args[0] = strdup(init_string);
+ p->numargs = 1;
+ }
/*
* Handle old style comma delimited. eg. "proj=utm,zone=11,ellps=WGS84".
*/
More information about the mapserver-commits
mailing list