issues with scale in wms raster layers

Smith, Michael Michael.Smith at MAINE.GOV
Tue Dec 11 16:02:23 EST 2007


I am trying to set up a WMS on MapServer to provide an image catalog to
ArcGIS users (I am running latest release of MS4W on a Windows XP SP2
box).  The problem I run into is odd behavior with setting scale
thresholds.  I see two issues:

1)  When I set a MAXSCALEDENOM or MINSCALEDENOM property for my layer,
the number I put it in there is not the actual min/max scale that is
shown in ArcGIS.  Instead the scale threshold shown in ArcGIS is 4/3 the
number I have in my .map file.  For example if I want my scale threshold
in ArcGIS to be 50,000, I have to put 37,500 in my .map file.

2)  I have 3 layers in my .map file, two are external overview images I
created with gdalwarp (following the steps outlined in
http://mapserver.gis.umn.edu/docs/howto/raster_data) and the third a
raster catalog with a tile index.  My .map file is below.  The problem
here is that if I use the MINSCALEDENOM and/or MAXSCALEDENOM in my layer
property for the catalog, and I include the overview images, then my
raster catalog does not render (it shows in the layer list in my client,
but nothing but white draws.  If I remove the overview layers from my
.map file and try again, my catalog will work fine and honor the scale
thresholds I set (once I adjust them as in #1 above).  If I remove the
catalog, the two overviews work correctly.  Just not all 3.

Clients I am using include ArcGIS 9.2 and Quantum GIS 0.9.  I see the
behavior in both.

Any suggestions?  Are there WMS-specific tags I should use in my
METADATA section instead?

***********
Michael Smith
Maine DEP/OIT

#
# Start of GMAP map file
#
#
NAME NW_DOQS
STATUS ON
SIZE 400 300
SYMBOLSET ../etc/symbols.sym
EXTENT 396000 5093000 501000 5261000
UNITS METERS
SHAPEPATH "../nw_doqs"
IMAGECOLOR 255 255 255
FONTSET ../etc/fonts.txt

OUTPUTFORMAT
  NAME JPEG
  DRIVER "GD/JPEG"
  IMAGEMODE RGB
  EXTENSION "jpeg"
  FORMATOPTION "QUALITY=75,PROGRESSIVE=TRUE"
END

OUTPUTFORMAT
  NAME PNG8
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  EXTENSION PNG
  IMAGEMODE PC256
  TRANSPARENT ON
END

#
# Start of web interface definition
#
WEB
  IMAGEPATH "/ms4w/tmp/ms_tmp/" 
  IMAGEURL "/ms_tmp/"
# For WMS
  METADATA
    "wms_title" "nw_doqs"
	"wms_onlineresource"
"http://csu-eia1pcgis2.som.w2k.state.me.us/cgi-bin/mapserv.exe?map=c:/ms
4w/apps/gmap/htdocs/nw_doqs.map&"
	"wms_srs" "EPSG:26919"
  END
END

#
# Projection - required for WMS
#
PROJECTION
  "init=epsg:26919"
END

#
# Start of layer definitions
#

LAYER
  NAME nw_doqs100m
  MINSCALEDENOM 375000
  METADATA
    "wms_title" "NW DOQs 100m overview"
  END
  TYPE RASTER
  STATUS ON
  DATA overview100.jp2
  PROJECTION
    "init=epsg:26919"
  END
END

LAYER
  NAME nw_doqs10m
  MINSCALEDENOM 37500
  MAXSCALEDENOM 375000
  METADATA
    "wms_title" "NW DOQs 10m overview"
  END
  TYPE RASTER
  STATUS ON
  DATA overview10.jp2
  PROJECTION
    "init=epsg:26919"
  END
END

LAYER
  NAME nw_doqs
  MAXSCALEDENOM 37500
  METADATA
    "wms_title" "NW DOQs"
  END
  TILEINDEX "nw_doqs_index.shp"
  TILEITEM "location"
  TYPE RASTER
  STATUS ON
  PROJECTION
    "init=epsg:26919"
  END
END

END # Map File



More information about the mapserver-users mailing list