[mapserver-commits] r7341 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Sat Feb 2 23:51:38 EST 2008
Author: warmerdam
Date: 2008-02-02 23:51:37 -0500 (Sat, 02 Feb 2008)
New Revision: 7341
Modified:
trunk/mapserver/mapows.c
Log:
add imageCRS urn support
Modified: trunk/mapserver/mapows.c
===================================================================
--- trunk/mapserver/mapows.c 2008-02-02 23:42:18 UTC (rev 7340)
+++ trunk/mapserver/mapows.c 2008-02-03 04:51:37 UTC (rev 7341)
@@ -1524,20 +1524,28 @@
{
char urn[100];
- if( strncmp(tokens[i],"EPSG:",5) != 0 )
- continue;
-
- /*
- ** Should we eventually use OGC "epsg-like" coordinate systems
- ** with our normal axis orientation? Fix later.
- */
- sprintf( urn, "urn:ogc:def:crs:EPSG::%s", tokens[i]+5 );
+ if( strncmp(tokens[i],"EPSG:",5) == 0 )
+ sprintf( urn, "urn:ogc:def:crs:EPSG::%s", tokens[i]+5 );
+ else if( strcasecmp(tokens[i],"imageCRS") == 0 )
+ sprintf( urn, "urn:ogc:def:crs:OGC::imageCRS" );
+ else if( strncmp(tokens[i],"urn:ogc:def:crs:",16) == 0 )
+ sprintf( urn, tokens[i] );
+ else
+ strcpy( urn, "" );
- result = (char *) realloc(result,strlen(result)+strlen(urn)+2);
-
- if( strlen(result) > 0 )
- strcat( result, " " );
- strcat( result, urn );
+ if( strlen(urn) > 0 )
+ {
+ result = (char *) realloc(result,strlen(result)+strlen(urn)+2);
+
+ if( strlen(result) > 0 )
+ strcat( result, " " );
+ strcat( result, urn );
+ }
+ else
+ {
+ msDebug( "msOWSGetProjURN(): Failed to process SRS '%s', ignored.",
+ tokens[i] );
+ }
}
msFreeCharArray(tokens, numtokens);
More information about the mapserver-commits
mailing list