[mapserver-commits] r12361 - in trunk/mapserver/mapcache: . src

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


Author: tbonfort
Date: 2011-08-26 04:19:40 -0700 (Fri, 26 Aug 2011)
New Revision: 12361

Modified:
   trunk/mapserver/mapcache/geocache.xml
   trunk/mapserver/mapcache/src/configuration.c
Log:
set version preparing for release 0.4
thomas.bonfort | 2011-05-18 18:11:31 +0200 (Wed, 18 May 2011)

Modified: trunk/mapserver/mapcache/geocache.xml
===================================================================
--- trunk/mapserver/mapcache/geocache.xml	2011-08-26 11:19:35 UTC (rev 12360)
+++ trunk/mapserver/mapcache/geocache.xml	2011-08-26 11:19:40 UTC (rev 12361)
@@ -89,6 +89,41 @@
          </grid>
    --> 
 
+   <!-- this grid is identical to the previous one, except that it uses epsg:900913 as the default srs as it is more supported -->
+   <!--
+        <grid>
+            <name>g</name>
+            <metadata>
+               <title>GoogleMapsCompatible</title>
+               <WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible</WellKnownScaleSet>
+            </metadata>
+            <extent>-20037508.3427892480,-20037508.3427892480,20037508.3427892480,20037508.3427892480</extent>
+            <srs>epsg:900913</srs>
+            <srsalias>epsg:3857</srsalias>
+            <size>256 256</size>
+            <resolutions>
+               156543.0339280410
+               78271.51696402048
+               39135.75848201023
+               19567.87924100512
+               9783.939620502561
+               4891.969810251280
+               2445.984905125640
+               1222.992452562820
+               611.4962262814100
+               305.7481131407048
+               152.8740565703525
+               76.43702828517624
+               38.21851414258813
+               19.10925707129406
+               9.554628535647032
+               4.777314267823516
+               2.388657133911758
+               1.194328566955879
+               0.5971642834779395
+            </resolutions>
+         </grid>
+   --> 
 
    <!--
         a cache is where tiles are stored once they have been rendered
@@ -305,7 +340,7 @@
          return images in the grid's srs.
       -->
          <grid restricted_extent="-10 40 10 50">WGS84</grid>
-         <grid>GoogleMapsCompatible</grid>
+         <grid>g</grid>
 
       <!-- metadata
          optional metadata tags used for responding to GetCapabilities request.
@@ -426,7 +461,7 @@
       <cache>disk</cache>
       <format>PNG</format>
       <grid>WGS84</grid>
-      <grid>GoogleMapsCompatible</grid>
+      <grid>g</grid>
       <metatile>5 5</metatile>
       <metabuffer>10</metabuffer>
    </tileset>

Modified: trunk/mapserver/mapcache/src/configuration.c
===================================================================
--- trunk/mapserver/mapcache/src/configuration.c	2011-08-26 11:19:35 UTC (rev 12360)
+++ trunk/mapserver/mapcache/src/configuration.c	2011-08-26 11:19:40 UTC (rev 12361)
@@ -140,6 +140,29 @@
       grid->levels[i] = level;
    }
    geocache_configuration_add_grid(cfg,grid,"GoogleMapsCompatible");
+   
+   grid = geocache_grid_create(pool);
+   grid->name = apr_pstrdup(pool,"g");
+   grid->srs = apr_pstrdup(pool,"epsg:900913");
+   APR_ARRAY_PUSH(grid->srs_aliases,char*) = 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;
+   grid->unit = GEOCACHE_UNIT_METERS;
+   grid->extent[0] = google_extent[0];
+   grid->extent[1] = google_extent[1];
+   grid->extent[2] = google_extent[2];
+   grid->extent[3] = google_extent[3];
+   grid->levels = (geocache_grid_level**)apr_pcalloc(pool,
+         grid->nlevels*sizeof(geocache_grid_level*));
+   for(i=0; i<grid->nlevels; i++) {
+      geocache_grid_level *level = (geocache_grid_level*)apr_pcalloc(pool,sizeof(geocache_grid_level));
+      level->resolution = google_resolutions[i];
+      grid->levels[i] = level;
+   }
+   geocache_configuration_add_grid(cfg,grid,"g");
 
    return cfg;
 }



More information about the mapserver-commits mailing list