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

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


Author: tbonfort
Date: 2011-08-26 04:13:32 -0700 (Fri, 26 Aug 2011)
New Revision: 12281

Modified:
   trunk/mapserver/mapcache/src/configuration.c
   trunk/mapserver/mapcache/src/service_tms.c
Log:
add regex and interval dimensions
thomas.bonfort | 2011-01-24 17:30:40 +0100 (Mon, 24 Jan 2011)

Modified: trunk/mapserver/mapcache/src/configuration.c
===================================================================
--- trunk/mapserver/mapcache/src/configuration.c	2011-08-26 11:13:27 UTC (rev 12280)
+++ trunk/mapserver/mapcache/src/configuration.c	2011-08-26 11:13:32 UTC (rev 12281)
@@ -100,6 +100,7 @@
    grid->name = apr_pstrdup(pool,"WGS84");
    apr_table_add(grid->metadata,"title","GoogleCRS84Quad");
    apr_table_add(grid->metadata,"wellKnownScaleSet","urn:ogc:def:wkss:OGC:1.0:GoogleCRS84Quad");
+   apr_table_add(grid->metadata,"profile","global-geodetic");
    grid->srs = apr_pstrdup(pool,"epsg:4326");
    grid->unit = GEOCACHE_UNIT_DEGREES;
    grid->tile_sx = grid->tile_sy = 256;
@@ -121,6 +122,7 @@
    grid->name = apr_pstrdup(pool,"GoogleMapsCompatible");
    grid->srs = apr_pstrdup(pool,"epsg:3857");
    apr_table_add(grid->metadata,"title","GoogleMapsCompatible");
+   apr_table_add(grid->metadata,"profile","global-mercator");
    apr_table_add(grid->metadata,"wellKnownScaleSet","urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible");
    grid->tile_sx = grid->tile_sy = 256;
    grid->nlevels = 19;
@@ -141,6 +143,7 @@
    grid = geocache_grid_create(pool);
    grid->name = apr_pstrdup(pool,"google");
    grid->srs = apr_pstrdup(pool,"epsg:900913");
+   apr_table_add(grid->metadata,"profile","global-mercator");
    apr_table_add(grid->metadata,"title","GoogleMapsCompatible");
    apr_table_add(grid->metadata,"wellKnownScaleSet","urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible");
    grid->tile_sx = grid->tile_sy = 256;

Modified: trunk/mapserver/mapcache/src/service_tms.c
===================================================================
--- trunk/mapserver/mapcache/src/service_tms.c	2011-08-26 11:13:27 UTC (rev 12280)
+++ trunk/mapserver/mapcache/src/service_tms.c	2011-08-26 11:13:32 UTC (rev 12281)
@@ -31,7 +31,7 @@
       "href=\"%s/tms/%s/%s@%s/\"\n"
       "srs=\"%s\"\n"
       "title=\"%s\"\n"
-      "profile=\"global-geodetic\" />";
+      "profile=\"%s\" />";
 
 static const char *tms_2="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
       "<TileMap version=\"%s\" tilemapservice=\"%s/tms/%s/\">\n"
@@ -80,8 +80,10 @@
             }
             for(j=0;j<tileset->grid_links->nelts;j++) {
                geocache_grid *grid = APR_ARRAY_IDX(tileset->grid_links,j,geocache_grid_link*)->grid;
+               const char *profile = apr_table_get(grid->metadata,"profile");
+               if(!profile) profile = "none";
                tilesetcaps = apr_psprintf(ctx->pool,tms_1,onlineresource,
-                     request->version,tileset->name,grid->name,grid->srs,title);
+                     request->version,tileset->name,grid->name,grid->srs,title,profile);
                caps = apr_psprintf(ctx->pool,"%s%s",caps,tilesetcaps);
             }
             tileindex_index = apr_hash_next(tileindex_index);



More information about the mapserver-commits mailing list