Raster zoom problem with ERDAS Imagine Files

Paul Moen pmoen at STATE.ND.US
Wed Jul 13 09:00:49 EDT 2005


Greetings,

We seem to be having some problems with our color orthophotography. Our map service is using
tiled county mosaics in an ERDAS Imagine (.img) (24 bit, RGB file) format. Errors will pop up in our
4.4 Mapserver instance when I try to zoom in past a scale of 1:9500 and color shifts occur after
zooming past certain scales.

You can view the problems by visiting HTTP://mapservice.swc.state.nd.us/indexmap.phtml.  Click
on log on in the upper right corner, and login as mapuser with mappass as the password.  Choose
the drop down list that says select your extent and select McKenzie Normal.  This shows the ortho
photo displayed properly.  McKenzie Bad Color zooms in to a 1:18034 scale and it is no longer
displayed.  Mountrail Color Ok moves to Mountrail County at a 1:18034 scale, but the colors are
displayed properly at the same scale with a different imagine file.  Finally, select Mountrail No
Image.  This is where the following error occurs and no image is displayed.

The error is:

PHP Warning:  [MapServer Error]: IReadBlock failed at X offset 703, Y offset 675: GDALRasterIO()
failed: drawGDAL() in drawmappm.php on line 105
PHP Fatal error:  Call to a member function on a non-object in drawmappm.php on line 228

I can zoom in to any scale with tiff files just not the Imagine files.  I cannot use tiff files since there
is a 2GB maximum file size, and the sizes of the county mosaics are running in the 10Gb to 25Gb
range.

Additionally, we’ve found color shifts to blue or red anytime we zoom to scales greater than about
1:20,000. However, this only seems to occur on the largest county mosaic (approx 25Gb). If we
move the locator box on the locator map to another location with a smaller county mosaic, we
don’t have the color shift problem, but the error messages still occur below 1:10,000.

My map file is below and the rasters are ERDAS imagine files.  The layer "Ortho Photos" causes the
error.

The only conclusion that we have come to is that:

a) there might be a problem displaying Imagine files

b) there might be a problem with the size of the files being displayed

c) there might be a problem with full color, as opposed to single band (256) color images (all the
Tifs are 256 color and we have no problems with them at any scale).

Has anyone run into a similar problem besides me?  I have not found anything by searching the
archives.  The same results occur with Mapserver 4.4 and 4.6 compiled with gdal-1.2.5.

An excerpt from our map file follows.

MAP

  NAME SWC

  IMAGETYPE PNG24

  EXTENT 1000000 0 3000000 1500000  # State Plane Coordinates (Feet)

  SIZE 524 524

  UNITS FEET

  SHAPEPATH "../mapdata"

  IMAGECOLOR 255 255 230

  TEMPLATEPATTERN "swc"

  SYMBOLSET "symbols.dat"

  FONTSET "../mapfiles/fonts/fonts.list"

  #**********************************************************************

  # Start of web interface definition (including WMS enabling metadata) *

  #**********************************************************************

  WEB

    HEADER templates/header.html

    TEMPLATE "set in indexwells.html"

    FOOTER "templates/footer.html"

    MINSCALE 9000

    MAXSCALE 10000000

    IMAGEPATH "/Applications/4DWebSTAR/WebServer/Defaultsite/tmp/"

    IMAGEURL "/tmp/"

  END

    REFERENCE

        IMAGE "../graphics/ndreference.png"

        EXTENT 1000000 160000 3000000 1200000

        SIZE 120 75

        STATUS ON

        MINBOXSIZE 5

        MAXBOXSIZE 100

        MARKERSIZE 8

        MARKER 'star'

    END



  #**************

  # Map Queries *

  #**************

      QUERYMAP

        COLOR 255 255 0

        STYLE hilite

    END



  #******************

  # Start of legend *

  #******************

  LEGEND

    KEYSIZE 18 12

    LABEL

      TYPE BITMAP

      SIZE MEDIUM

      COLOR 0 0 89

    END

    STATUS ON

  END


  #********************

  # Start of scalebar *

  #********************

  SCALEBAR

    IMAGECOLOR 255 255 255

    LABEL

      COLOR 0 0 0

      SIZE TINY

    END

    STYLE 1

    SIZE 100 2

    COLOR 0 0 0

    UNITS MILES

    INTERVALS 1

    TRANSPARENT false

    STATUS ON

  END

 LAYER

    GROUP "Raster Images"

    TYPE RASTER

    STATUS OFF

    NAME "Ortho Photos"

    PROCESSING "BANDS=1,2,3"

    OFFSITE 0 0 0

    TILEINDEX CountyIndex

    TILEITEM "Orthos"

  END

END

thank you,

Paul Moen



More information about the mapserver-users mailing list