projection problem

Serkan Girgin girgink at GMAIL.COM
Thu Dec 15 14:53:49 PST 2005


Hi!

I have a problem with on-the-fly projection and I would be grateful if you
can help me. In my mapfile there is a raster Landsat image in UTM projection
(zone 37N) and a shapefile containing a polygon with the same extent of the
raster, again in UTM projection. When I set the overall projection of the
mapfile to UTM these two layers coincide perfectly as expected (see
landsat_utm.jpg). But when I change mapfile projection to a different
projection, e.g. geographic or Lambert Conformal Conic, a shift occurs
between the layers and they do not coincide (see landsat_lcc.jpg). Do you
have any idea why this happens? You can find mapfiles that I used below.

Thanks, 

---
Serkan Girgin
girgink at gmail.com 

* * *

Mapfile 1: (UTM)
MAP
	NAME Turkey
	IMAGETYPE JPEG
	EXTENT 126634 3798339 873344 4509666
	IMAGECOLOR 255 255 255
	UNITS DD
	PROJECTION
		"proj=utm"
		"zone=37"
		"ellps=WGS84"
	END
	
	LAYER
		NAME n37-35
		DATA "n37-35.img"
		TYPE RASTER
		PROJECTION
			"proj=utm"
			"zone=37"
			"ellps=WGS84"
		END
		STATUS DEFAULT
	END	
	
	LAYER
		NAME n37-35-shape
		DATA " n37-35.shp"
		TYPE POLYGON
		CLASS
			NAME "boundary"
			STYLE
				OUTLINECOLOR 255 0 0
			END 
		END
		PROJECTION
			"proj=utm"
			"zone=37"
			"ellps=WGS84"
		END
		STATUS DEFAULT
	END		
END

* * *
Mapfile 2: (LCC)
MAP
	NAME Turkey
	IMAGETYPE JPEG
 	EXTENT 1087605 1129233 1800348 1727363
	UNITS DD
	PROJECTION
		"proj=lcc"
		"lat_1=40.5"
		"lat_2=43.5"
		"lat_0=34"
		"lon_0=25"
		"x_0=1000000"
		"ellps=WGS84"
	END
	
	LAYER
		NAME n37-35
		DATA "n37-35.img"
		TYPE RASTER
		PROJECTION
			"proj=utm"
			"zone=37"
			"ellps=WGS84"
		END
		STATUS DEFAULT
	END	
	
	LAYER
		NAME n37-35-shape
		DATA "n37-35.shp"
		TYPE POLYGON
		CLASS
			NAME "boundary"
			STYLE
				OUTLINECOLOR 255 0 0
			END 
		END
		PROJECTION
			"proj=utm"
			"zone=37"
			"ellps=WGS84"
		END
		STATUS DEFAULT
	END		
END

-------------- next part --------------
A non-text attachment was scrubbed...
Name: landsat_utm.jpg
Type: image/jpeg
Size: 14518 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20051216/c09ebc25/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: landsat_lcc.jpg
Type: image/jpeg
Size: 16557 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20051216/c09ebc25/attachment-0001.jpg>


More information about the MapServer-users mailing list