[mapserver-commits] r12303 - trunk/mapserver/mapcache/src
svn at osgeo.org
svn at osgeo.org
Fri Aug 26 07:15:16 EDT 2011
Author: tbonfort
Date: 2011-08-26 04:15:16 -0700 (Fri, 26 Aug 2011)
New Revision: 12303
Modified:
trunk/mapserver/mapcache/src/service_wmts.c
Log:
add missing include
thomas.bonfort | 2011-02-10 11:30:05 +0100 (Thu, 10 Feb 2011)
Modified: trunk/mapserver/mapcache/src/service_wmts.c
===================================================================
--- trunk/mapserver/mapcache/src/service_wmts.c 2011-08-26 11:15:12 UTC (rev 12302)
+++ trunk/mapserver/mapcache/src/service_wmts.c 2011-08-26 11:15:16 UTC (rev 12303)
@@ -75,7 +75,7 @@
static const char *wmts_matrix =
" <TileMatrix>\n"
- " <ows:Identifier>%s:%d</ows:Identifier>\n"
+ " <ows:Identifier>%d</ows:Identifier>\n"
" <ScaleDenominator>%.20f</ScaleDenominator>\n"
" <TopLeftCorner>%f %f</TopLeftCorner>\n"
" <TileWidth>%d</TileWidth>\n"
@@ -260,7 +260,7 @@
for(level=0;level<grid->nlevels;level++) {
double scaledenom = grid->levels[level]->resolution * geocache_meters_per_unit[grid->unit] / 0.00028;
matrix = apr_psprintf(ctx->pool,wmts_matrix,
- grid->name, level,
+ level,
scaledenom,
grid->extent[0],grid->extent[3],
grid->tile_sx, grid->tile_sy,
@@ -473,18 +473,11 @@
ctx->set_error(ctx, 404, "received wmts request with no TILEMATRIX");
return;
} else {
- const char *levelptr=NULL,*key; /*ptr to the last part of tilematrix:level*/
- for(key=matrix;*key;key++) if(*key == ':') levelptr=key;
- if(!levelptr || !*(++levelptr)) {
- ctx->set_error(ctx, 404, "received wmts request with invalid TILEMATRIX %s", matrix);
+ char *endptr;
+ level = (int)strtol(matrix,&endptr,10);
+ if(*endptr != 0 || level < 0 || level >= grid_link->grid->nlevels) {
+ ctx->set_error(ctx, 404, "received wms request with invalid TILEMATRIX %s", matrix);
return;
- } else {
- char *endptr;
- level = (int)strtol(levelptr,&endptr,10);
- if(*endptr != 0 || level < 0 || level >= grid_link->grid->nlevels) {
- ctx->set_error(ctx, 404, "received wms request with invalid TILEMATRIX %s", matrix);
- return;
- }
}
}
More information about the mapserver-commits
mailing list