[mapserver-commits] r12213 - trunk/mapserver/mapcache/src

svn at osgeo.org svn at osgeo.org
Fri Aug 26 07:07:45 EDT 2011


Author: tbonfort
Date: 2011-08-26 04:07:45 -0700 (Fri, 26 Aug 2011)
New Revision: 12213

Modified:
   trunk/mapserver/mapcache/src/configuration.c
   trunk/mapserver/mapcache/src/source_wms.c
Log:
s/stdlib/unistd/
thomas.bonfort | 2011-01-07 14:36:49 +0100 (Fri, 07 Jan 2011)

Modified: trunk/mapserver/mapcache/src/configuration.c
===================================================================
--- trunk/mapserver/mapcache/src/configuration.c	2011-08-26 11:07:41 UTC (rev 12212)
+++ trunk/mapserver/mapcache/src/configuration.c	2011-08-26 11:07:45 UTC (rev 12213)
@@ -643,6 +643,18 @@
       ctx->set_error(ctx, GEOCACHE_PARSE_ERROR, "tileset \"%s\" has no source configured."
             " You must add a <source> tag.", tileset->name);
       return;
+   } else {
+      /*check srs are consistent*/
+      if(!tileset->source->srs) {
+         tileset->source->srs = tileset->grid->srs;
+      } else {
+         if(strcasecmp(tileset->source->srs , tileset->grid->srs)) {
+            ctx->log(ctx, GEOCACHE_WARNING, "tileset (%s) srs mismatch: source (%s)=>(%s) , grid (%s)=>(%s)",
+                  tileset->name,
+                  tileset->source->name, tileset->source->srs,
+                  tileset->grid->name, tileset->grid->srs);
+         }
+      }
    }
 
    if(tileset->grid == NULL) {

Modified: trunk/mapserver/mapcache/src/source_wms.c
===================================================================
--- trunk/mapserver/mapcache/src/source_wms.c	2011-08-26 11:07:41 UTC (rev 12212)
+++ trunk/mapserver/mapcache/src/source_wms.c	2011-08-26 11:07:45 UTC (rev 12213)
@@ -31,7 +31,7 @@
    apr_table_setn(params,"WIDTH",apr_psprintf(ctx->pool,"%d",tile->tile.sx));
    apr_table_setn(params,"HEIGHT",apr_psprintf(ctx->pool,"%d",tile->tile.sy));
    apr_table_setn(params,"FORMAT","image/png");
-   apr_table_setn(params,"SRS",tile->tile.tileset->grid->srs);
+   apr_table_setn(params,"SRS",wms->source.srs);
    
    apr_table_overlap(params,wms->wms_params,0);
         



More information about the mapserver-commits mailing list