<HTML>
<HEAD>
<TITLE>Re: [UMN_MAPSERVER-USERS] latlong issues</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Chris -<BR>
<BR>
First, I think you&#8217;re using &#8220;geocodes&#8221; in an unusual way, and I&#8217;m not really sure what you mean by it. &nbsp;&#8220;Geocode&#8221; is a verb that means &#8220;take some data (like street addresses) and turn it into geographic coordinates (like lat/lon)&#8221;. &nbsp;The process is called geocoding. &nbsp;You&#8217;re using it as a noun and I really can&#8217;t figure out just what you mean. &nbsp;If you can give some examples that would be helpful.<BR>
<BR>
The EXTENT of your map must be specified in the units and coordinates of the output projection of your map image. &nbsp;While you can combine lat/lon data and UTM data in multiple layers, your output map image must be one projection. &nbsp;As I recall, you were taking a UTM source raster and producing a UTM output image. &nbsp;That&#8217;s fine. &nbsp;Do you want to change that? &nbsp;I would discourage you strongly from changing your output projection, as UTM is an excellent choice for your application.<BR>
<BR>
Your raster map image shows a certain portion of the world, at a certain resolution/scale, in a particular projection. &nbsp;Your world file documents this information so applications can use it. &nbsp;You can&#8217;t modify your image by playing with the world file &#8211; the world file either accurately describes the raster image, or it&#8217;s wrong. &nbsp;I think you had a correct world file for your raster layer already; if so, don&#8217;t touch it &#8211; you can only make it incorrect.<BR>
<BR>
If you can explain a little about what your geocodes are and how you need to display them we can probably help. &nbsp;If I&#8217;m missing the boat please try to explain what it is you&#8217;re trying to go (in non-technical terms).<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Ed<BR>
&nbsp;&nbsp;<BR>
-- <BR>
Ed McNierney<BR>
Chief Mapmaker<BR>
Demand Media / TopoZone.com<BR>
73 Princeton Street, Suite 305<BR>
North Chelmsford, MA &nbsp;01863<BR>
Phone: (978) 251-4242<BR>
Fax: (978) 251-1396<BR>
ed@topozone.com<BR>
<BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"><B>From: </B>Christopher Harris &lt;docterrobert@MSN.COM&gt;<BR>
<B>Reply-To: </B>Christopher Harris &lt;docterrobert@MSN.COM&gt;<BR>
<B>Date: </B>Mon, 10 Sep 2007 11:44:06 -0500<BR>
<B>To: </B>&lt;MAPSERVER-USERS@LISTS.UMN.EDU&gt;<BR>
<B>Subject: </B>[UMN_MAPSERVER-USERS] latlong issues<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;Hi. &nbsp;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. &nbsp;That all works. &nbsp;Now, I have new questions.<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;My world file is using the UTM projection. &nbsp;The tricky part now is that I need to specify in my map file the extent in latitudes and longitudes. &nbsp;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. &nbsp;So I have all that compensated for, otherwise I wouldn't have gotten it working in meters for UTM as my extent. &nbsp;I've tried entering in the geocodes as the extent for the MAP object. &nbsp;That didn't work. &nbsp;So, I figured &quot;I'm using UTM in my world file. &nbsp;Maybe I need to specify latlong projection for the MAP object.&quot; &nbsp;That didn't work either. &nbsp;I then tried adding that same projection to the one layer that I have. &nbsp;No luck. &nbsp;The image comes up blank once again. &nbsp;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? &nbsp;Every example I've seen on the net uses UTM. &nbsp;I've tried geocodes for the world file, but gdalinfo &lt;image&gt; indicates that the corner coordinates are totally off.<BR>
<BR>
The .php file is nothing special or elaborate. &nbsp;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 &nbsp;(I have the projections commented out as well as the EXTENT in METERS that worked)<BR>
MAP<BR>
&nbsp;&nbsp;&nbsp;&nbsp;NAME UniversityOfIllinois<BR>
&nbsp;&nbsp;&nbsp;&nbsp;STATUS ON<BR>
&nbsp;&nbsp;&nbsp;&nbsp;SIZE 1747 1916<BR>
&nbsp;&nbsp;&nbsp;&nbsp;IMAGETYPE GIF &nbsp;&nbsp;&nbsp;#image is 1747 X 1916 pixels<BR>
&nbsp;&nbsp;&nbsp;&nbsp;#PROJECTION<BR>
&nbsp;&nbsp;&nbsp;&nbsp;# &nbsp;&nbsp;&nbsp;&quot;proj=latlong&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;# &nbsp;&nbsp;&nbsp;&quot;ellps=WGS84&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;# &nbsp;&nbsp;&nbsp;&quot;datum=NAD83&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;#END<BR>
&nbsp;&nbsp;&nbsp;&nbsp;#EXTENT 393897.50 4437029.50 395644.50 4438945.50<BR>
&nbsp;&nbsp;&nbsp;&nbsp;#UNITS METERS<BR>
&nbsp;&nbsp;&nbsp;&nbsp;EXTENT 40.071888 -88.244698 40.094110 -88.217468<BR>
&nbsp;&nbsp;&nbsp;&nbsp;SHAPEPATH &quot;/var/www/mapserver/basic/data/illinois/&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;IMAGECOLOR 255 255 255<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;OUTPUTFORMAT<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NAME thegif<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DRIVER &quot;GD/GIF&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MIMETYPE &quot;image/gif&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IMAGEMODE RGB<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EXTENSION &quot;gif&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;END<BR>
&nbsp;&nbsp;&nbsp;&nbsp;OUTPUTFORMAT<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NAME thepng<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DRIVER &quot;GD/PNG&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MIMETYPE &quot;image/png&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IMAGEMODE PC256<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EXTENSION &quot;png&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;END<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;WEB<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IMAGEPATH &quot;/var/www/mapserver/basic/images/&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IMAGEURL &quot;/mapserver/basic/images/&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;END<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;LAYER<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NAME &quot;UofI&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DATA &quot;colorUofIllinois.gif&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TYPE RASTER<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;STATUS DEFAULT<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#PROJECTION<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# &nbsp;&nbsp;&nbsp;&quot;proj=latlong&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# &nbsp;&nbsp;&nbsp;&quot;ellps=WGS84&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# &nbsp;&nbsp;&nbsp;&quot;datum=NAD83&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#END<BR>
&nbsp;&nbsp;&nbsp;&nbsp;END &nbsp;&nbsp;&nbsp;<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. &nbsp;Thanks advance.<BR>
<BR>
&nbsp;- Chris<BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="100%">Gear up for Halo&reg; 3 and get a $25 Best Buy gift card. It&#8217;s our way of saying thanks for using Windows Live&#8482;. Get it now! <a href="http://gethalo3gear.com?ocid=SeptemberWLHalo3_WLHMTxt_1">&lt;http://gethalo3gear.com?ocid=SeptemberWLHalo3_WLHMTxt_1&gt;</a> <BR>
</SPAN></FONT>
</BODY>
</HTML>