<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi. I posted last week about trying to get an image that I already have to be displayed on a layer with help from a world file. That all works. Now, I have new questions.<br><br> My world file is using the UTM projection. The tricky part now is that I need to specify in my map file the extent in latitudes and longitudes. I have the appropriate geocodes, and I know that a world file and extent are lower left x,y then top right x,y and that an image is top left x,y then bottom right x,y. So I have all that compensated for, otherwise I wouldn't have gotten it working in meters for UTM as my extent. I've tried entering in the geocodes as the extent for the MAP object. That didn't work. So, I figured "I'm using UTM in my world file. Maybe I need to specify latlong projection for the MAP object." That didn't work either. I then tried adding that same projection to the one layer that I have. No luck. The image comes up blank once again. And yes, I've read the section on rasters.<br><br>My questions:<br>How do I switch from using Meters as my extent to geocodes?<br>Do I need to use UTM for my world file? Every example I've seen on the net uses UTM. I've tried geocodes for the world file, but gdalinfo <image> indicates that the corner coordinates are totally off.<br><br>
The .php file is nothing special or elaborate. It just simply creates the image and draws it.<br><br>My world file:<br>1<br>0.0000000000<br>0.0000000000<br>-1<br>393898.00<br>4438945.00<br><br>My map file (I have the projections commented out as well as the EXTENT in METERS that worked)<br>MAP<br> NAME UniversityOfIllinois<br> STATUS ON<br> SIZE 1747 1916<br> IMAGETYPE GIF #image is 1747 X 1916 pixels<br> #PROJECTION<br> # "proj=latlong"<br> # "ellps=WGS84"<br> # "datum=NAD83"<br> #END<br> #EXTENT 393897.50 4437029.50 395644.50 4438945.50<br> #UNITS METERS<br> EXTENT 40.071888 -88.244698 40.094110 -88.217468<br> SHAPEPATH "/var/www/mapserver/basic/data/illinois/"<br> IMAGECOLOR 255 255 255<br> <br> OUTPUTFORMAT<br> NAME thegif<br> DRIVER "GD/GIF"<br> MIMETYPE "image/gif"<br> IMAGEMODE RGB<br> EXTENSION "gif"<br> END<br> OUTPUTFORMAT<br> NAME thepng<br> DRIVER "GD/PNG"<br> MIMETYPE "image/png"<br> IMAGEMODE PC256<br> EXTENSION "png"<br> END<br><br> WEB<br> IMAGEPATH "/var/www/mapserver/basic/images/"<br> IMAGEURL "/mapserver/basic/images/"<br> END<br><br> LAYER<br> NAME "UofI"<br> DATA "colorUofIllinois.gif"<br> TYPE RASTER<br> STATUS DEFAULT<br> #PROJECTION<br> # "proj=latlong"<br> # "ellps=WGS84"<br> # "datum=NAD83"<br> #END<br> END <br>END<br><br>Any extra info needed:<br>MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG<br><br>Any help would be spectacular. Thanks advance.<br><br> - Chris<br><br /><hr />Gear up for Halo® 3 and get a $25 Best Buy gift card. It’s our way of saying thanks for using Windows Live™. <a href='http://gethalo3gear.com?ocid=SeptemberWLHalo3_WLHMTxt_1' target='_new'>Get it now!</a></body>
</html>