[mapserver-users] mapserver 5 TIFF displaying problem

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Wed Sep 17 03:03:58 PDT 2008


Tere.
 
You have defined the output projection as epsg:4326 and by quick look it is OK in both map projection and WMS metadata.  However, your original image is in Estonian projection, but Mapserver does not know it automatically.  You need to add PROJECTION block to layer definitions as well.  Try editin your mapfile as follows: 
 
LAYER
  TYPE RASTER
  NAME "raster"
  STATUS ON
  DATA "54653.tif"
PROJECTION
   "init=epsg:3301"
END  #end projection
END #end layer

I hope I guessed the epsg code right.
 
-Jukka Rahkonen-
 

 


________________________________

	Lähettäjä: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Raivo Alla
	Lähetetty: 17. syyskuuta 2008 12:51
	Vastaanottaja: mapserver-users at lists.osgeo.org
	Aihe: Re: [mapserver-users] mapserver 5 TIFF displaying problem
	
	
	Thank you for answering!
	
	There's some additional information. Gdalinfo output:
	
	Driver: GTiff/GeoTIFF
	Files: 65812.tif
	       65812.aux
	Size is 5000, 5000
	Coordinate System is:
	LOCAL_CS["Estonia_1997_Estonia_National_Grid",
	    UNIT["meters",1]]
	Origin = (715000.500000000000000,6584999.500000000000000)
	Pixel Size = (1.000000000000000,-1.000000000000000)
	Metadata:
	  TIFFTAG_XRESOLUTION=2272.0896
	  TIFFTAG_YRESOLUTION=2272.0896
	  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
	Image Structure Metadata:
	  COMPRESSION=LZW
	  INTERLEAVE=PIXEL
	Corner Coordinates:
	Upper Left  (  715000.500, 6584999.500)
	Lower Left  (  715000.500, 6579999.500)
	Upper Right (  720000.500, 6584999.500)
	Lower Right (  720000.500, 6579999.500)
	Center      (  717500.500, 6582499.500)
	Band 1 Block=5000x8 Type=Byte, ColorInterp=Red
	  Metadata:
	    LAYER_TYPE=athematic
	Band 2 Block=5000x8 Type=Byte, ColorInterp=Green
	  Metadata:
	    LAYER_TYPE=athematic
	Band 3 Block=5000x8 Type=Byte, ColorInterp=Blue
	  Metadata:
	    LAYER_TYPE=athematic
	
	
	And from .map file:
	IMAGETYPE PNG
	 OUTPUTFORMAT
	  NAME png
	  DRIVER "GD/PNG"
	  MIMETYPE "image/png"
	  IMAGEMODE RGB
	END
	PROJECTION
	     "init=epsg:4326"
	END
	METADATA
	    WMS_TITLE "UMN MapServer Maa-ameti TEST"
	    WMS_ABSTRACT "Mõeldud testimiseks"
	    WMS_ACCESSCONSTRAINTS "none"
	    WMS_SRS "EPSG:4326"
	END
	
	Could it be problem that coordinate systems does not match?
	However, I remember it's written that Mapserver could do SRS transforming on-the-fly.
	
	
	
	
	On Wed, Sep 17, 2008 at 11:23 AM, Rahkonen Jukka <Jukka.Rahkonen at mmmtike.fi> wrote:
	

		
		Hi,
		 
		Impossible to say with this information.  Much better possibilities to help you if you could send also the main MAP part of your mapfile including at lesast outputformat and projection, and the metadata sections.  Gdalinfo report about the image might be helpful as well.
		 
		-Jukka Rahkonen-


________________________________

			Lähettäjä: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Raivo Alla
			Lähetetty: 17. syyskuuta 2008 9:38
			Vastaanottaja: mapserver-users at lists.osgeo.org
			Aihe: [mapserver-users] mapserver 5 TIFF displaying problem
			
			
			Hello,
			
			I'm quite new using Mapserver and found myself struggling with this simple-looking problem:
			
			In my map file, there is layer defined as follows:
			LAYER
			 TYPE RASTER
			 NAME "raster"
			 STATUS ON
			 DATA "54653.tif"
			END
			
			The problem is, that this image is corrupted when I look at it in ArcMap - it contains strange black boxes and stripes. Original image is OK, so
			I guess the problem is somewhere in map file. 
			.tfw file should be ok:
			1.000000000000000
			0.000000000000000
			0.000000000000000
			-1.000000000000000
			650000.500000000000000
			6469999.500000000000000
			
			What could be the problem?
			
			
			Raivo Alla
			


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080917/1b28cfcb/attachment.htm>


More information about the MapServer-users mailing list