Opened 20 years ago

Closed 20 years ago

#747 closed defect (duplicate)

MapServer will not draw layers defined in other UTM zones

Reported by: jmalczyk@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer CGI Version: 4.2
Severity: normal Keywords:
Cc:

Description

I am attempting to display UTM projected data from multiple zones and I am 
running into the following error: 

msDrawMap(): Image handling error. Failed to draw layer named 'DRG11'.

The layer that fails to draw is always defined in a UTM projection outside the 
UTM projection I set in the MAP object or in the SRS parameter of the 
querystring. Layers defined in non-UTM projections draw correctly, however the 
only other data I have been able to test with has been latlon data (both raster 
and vector based). This error does NOT happen if I use a bounding box that 
straddles the zone boundary, in that case the map draws correctly with data 
from each UTM zone projected into the map's projection.

An example:
A correctly drawn map on the zone 11/12 boundary, in the UTM zone 11 
projection...

http://216.162.212.88/cgi-bin/mapserv.exe?
Request=GetMap&Version=1.1.1&map=mapfiles/test.map&SRS=EPSG:32611&BBox=765785.37
25663334,4097456.571054054,767735.7201990384,4098918.568731778&width=640&height=
480&layers=DRG

But move the bounding box away from the edge and you get the error...
http://216.162.212.88/cgi-bin/mapserv.exe?
Request=GetMap&Version=1.1.1&map=mapfiles/test.map&SRS=EPSG:26911&BBox=665785.37
25663334,4097456.571054054,667735.7201990384,4098918.568731778&width=640&height=
480&layers=DRG

The test mapfile is as follows...

MAP
  NAME TEST
  SHAPEPATH "\Maps\data\"
  IMAGECOLOR 0 0 0
  
  IMAGETYPE png24

   PROJECTION
      "init=EPSG:26911"
   END

   LAYER
      NAME "DRG11"
      GROUP "DRG"
      TYPE RASTER
      OFFSITE 0 0 0
      STATUS OFF
      TILEINDEX "INDEX\DRG25-11"            
      PROJECTION 
  	 "init=EPSG:26911"
      END
   END
  
   LAYER
      NAME "DRG12"
      GROUP "DRG"
      TYPE RASTER
      OFFSITE 0 0 0
      STATUS OFF
      TILEINDEX "INDEX\DRG25-12"       
      PROJECTION 
	 "init=EPSG:26912"
      END
   END 
END

My mapserv v- output is...
MapServer version 4.2.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF
 OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=POSTGIS 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Ideas?

Thanks,
Jeremy

Attachments (1)

index.zip (610.5 KB ) - added by jmalczyk@… 20 years ago.
DRG25-11 and DRG25-12 index files

Download all attachments as: .zip

Change History (5)

comment:1 by sdlime, 20 years ago

Cc: warmerdam@… added

comment:2 by fwarmerdam, 20 years ago

Interesting.

The "failed to draw layer named 'DRG11' generally just means an error code
was returned from somewhere in the msDrawLayer() call.  It would be nice
if we could narrow down the source somewhat.  Would it be possible to run the
example through "shp2img" with debugging turned way up?  

eg. 

set CPL_DEBUG=ON
shp2img -m test.map -o out.png -e 665785  4097456 667735 4098918 -debug_all 1

See if any additional helpful messages are visible.

If not, could you please bundle up the index files and attach them to this bug
report?  That should be enough for me to try and reproduce the error message.


by jmalczyk@…, 20 years ago

Attachment: index.zip added

DRG25-11 and DRG25-12 index files

comment:3 by jmalczyk@…, 20 years ago

Frank,

I ran shp2img as you asked and it wasn't very enlightening. It outputted the 
following text and failed to write an image. Also, I have attached those index 
files. Thanks!

ëPNG
→
IHDR  ☺,  ☺☻  ☺∞►·║  ☺tIDATx£φ┴1☺   ┬á⌡O_á



                                                                       α5üy ☺¡╛
┴
    IEND«B`éGDAL: GDALDeregister_GTiff() called.

comment:4 by fwarmerdam, 20 years ago

Resolution: duplicate
Status: newclosed
Good news! This bug has already been fixed. I is a duplicate of bug 729.

I'm not sure whether new builds of stuff are available with this fixed or not.
Hopefully there will be a 4.2.1 available soon.


*** This bug has been marked as a duplicate of 729 ***
Note: See TracTickets for help on using tickets.