[mapserver-commits] r7855 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Aug 14 18:33:59 EDT 2008
Author: tamas
Date: 2008-08-14 18:33:58 -0400 (Thu, 14 Aug 2008)
New Revision: 7855
Modified:
trunk/mapserver/mapquery.c
trunk/mapserver/mapraster.c
Log:
Support for the MapInfo style zoom layering option (#2738)
Modified: trunk/mapserver/mapquery.c
===================================================================
--- trunk/mapserver/mapquery.c 2008-08-14 19:22:48 UTC (rev 7854)
+++ trunk/mapserver/mapquery.c 2008-08-14 22:33:58 UTC (rev 7855)
@@ -458,8 +458,13 @@
if(map->scaledenom > 0) {
if((lp->maxscaledenom > 0) && (map->scaledenom > lp->maxscaledenom)) continue;
if((lp->minscaledenom > 0) && (map->scaledenom <= lp->minscaledenom)) continue;
- }
+ }
+ if (lp->maxscaledenom <= 0 && lp->minscaledenom <= 0) {
+ if((lp->maxgeowidth > 0) && ((map->extent.maxx - map->extent.minx) > lp->maxgeowidth)) continue;
+ if((lp->mingeowidth > 0) && ((map->extent.maxx - map->extent.minx) < lp->mingeowidth)) continue;
+ }
+
/* Raster layers are handled specially. */
if( lp->type == MS_LAYER_RASTER ) {
if( msRasterQueryByRect( map, lp, rect ) == MS_FAILURE)
@@ -649,6 +654,11 @@
if((lp->minscaledenom > 0) && (map->scaledenom <= lp->minscaledenom)) continue;
}
+ if (lp->maxscaledenom <= 0 && lp->minscaledenom <= 0) {
+ if((lp->maxgeowidth > 0) && ((map->extent.maxx - map->extent.minx) > lp->maxgeowidth)) continue;
+ if((lp->mingeowidth > 0) && ((map->extent.maxx - map->extent.minx) < lp->mingeowidth)) continue;
+ }
+
/* Get the layer tolerance
default is 3 for point and line layers, 0 for others */
if(lp->tolerance == -1)
@@ -890,6 +900,11 @@
if((lp->minscaledenom > 0) && (map->scaledenom <= lp->minscaledenom)) continue;
}
+ if (lp->maxscaledenom <= 0 && lp->minscaledenom <= 0) {
+ if((lp->maxgeowidth > 0) && ((map->extent.maxx - map->extent.minx) > lp->maxgeowidth)) continue;
+ if((lp->mingeowidth > 0) && ((map->extent.maxx - map->extent.minx) < lp->mingeowidth)) continue;
+ }
+
/* Raster layers are handled specially. */
if( lp->type == MS_LAYER_RASTER ) {
if( msRasterQueryByPoint( map, lp, mode, p, buffer )
@@ -1071,6 +1086,11 @@
if((lp->minscaledenom > 0) && (map->scaledenom <= lp->minscaledenom)) continue;
}
+ if (lp->maxscaledenom <= 0 && lp->minscaledenom <= 0) {
+ if((lp->maxgeowidth > 0) && ((map->extent.maxx - map->extent.minx) > lp->maxgeowidth)) continue;
+ if((lp->mingeowidth > 0) && ((map->extent.maxx - map->extent.minx) < lp->mingeowidth)) continue;
+ }
+
/* Raster layers are handled specially. */
if( lp->type == MS_LAYER_RASTER )
{
@@ -1276,6 +1296,11 @@
if((lp->minscaledenom > 0) && (map->scaledenom <= lp->minscaledenom)) continue;
}
+ if (lp->maxscaledenom <= 0 && lp->minscaledenom <= 0) {
+ if((lp->maxgeowidth > 0) && ((map->extent.maxx - map->extent.minx) > lp->maxgeowidth)) continue;
+ if((lp->mingeowidth > 0) && ((map->extent.maxx - map->extent.minx) < lp->mingeowidth)) continue;
+ }
+
/* Raster layers are handled specially. */
if( lp->type == MS_LAYER_RASTER )
{
Modified: trunk/mapserver/mapraster.c
===================================================================
--- trunk/mapserver/mapraster.c 2008-08-14 19:22:48 UTC (rev 7854)
+++ trunk/mapserver/mapraster.c 2008-08-14 22:33:58 UTC (rev 7855)
@@ -1238,6 +1238,19 @@
}
}
+ if(layer->maxscaledenom <= 0 && layer->minscaledenom <= 0) {
+ if((layer->maxgeowidth > 0) && ((map->extent.maxx - map->extent.minx) > layer->maxgeowidth)) {
+ if(layer->debug == MS_TRUE) msDebug( "msDrawRasterLayerLow(%s): skipping, map width %.2g > MAXSCALEDENOM=%g\n", layer->name,
+ (map->extent.maxx - map->extent.minx), layer->maxgeowidth );
+ return(0);
+ }
+ if((layer->mingeowidth > 0) && ((map->extent.maxx - map->extent.minx) < layer->mingeowidth)) {
+ if(layer->debug == MS_TRUE) msDebug( "msDrawRasterLayerLow(%s): skipping, map width %.2g < MINSCALEDENOM=%g\n", layer->name,
+ (map->extent.maxx - map->extent.minx), layer->mingeowidth );
+ return(0);
+ }
+ }
+
force_gdal = MS_FALSE;
if(MS_RENDERER_GD(image->format))
img = image->img.gd;
More information about the mapserver-commits
mailing list