latlong issues

Christopher Harris docterrobert at MSN.COM
Mon Sep 10 09:44:06 PDT 2007


    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.

    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.

My questions:
How do I switch from using Meters as my extent to geocodes?
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.


The .php file is nothing special or elaborate.  It just simply creates the image and draws it.

My world file:
1
0.0000000000
0.0000000000
-1
393898.00
4438945.00

My map file  (I have the projections commented out as well as the EXTENT in METERS that worked)
MAP
    NAME UniversityOfIllinois
    STATUS ON
    SIZE 1747 1916
    IMAGETYPE GIF    #image is 1747 X 1916 pixels
    #PROJECTION
    #    "proj=latlong"
    #    "ellps=WGS84"
    #    "datum=NAD83"
    #END
    #EXTENT 393897.50 4437029.50 395644.50 4438945.50
    #UNITS METERS
    EXTENT 40.071888 -88.244698 40.094110 -88.217468
    SHAPEPATH "/var/www/mapserver/basic/data/illinois/"
    IMAGECOLOR 255 255 255
    
    OUTPUTFORMAT
        NAME thegif
        DRIVER "GD/GIF"
        MIMETYPE "image/gif"
        IMAGEMODE RGB
        EXTENSION "gif"
    END
    OUTPUTFORMAT
        NAME thepng
        DRIVER "GD/PNG"
        MIMETYPE "image/png"
        IMAGEMODE PC256
        EXTENSION "png"
    END

    WEB
            IMAGEPATH "/var/www/mapserver/basic/images/"
            IMAGEURL "/mapserver/basic/images/"
        END

    LAYER
        NAME "UofI"
          DATA "colorUofIllinois.gif"
          TYPE RASTER
          STATUS DEFAULT
        #PROJECTION
        #    "proj=latlong"
        #    "ellps=WGS84"
        #    "datum=NAD83"
        #END
    END    
END

Any extra info needed:
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

Any help would be spectacular.  Thanks advance.

 - Chris

_________________________________________________________________
Gear up for Halo® 3 with free downloads and an exclusive offer. It’s our way of saying thanks for using Windows Live™.
http://gethalo3gear.com?ocid=SeptemberWLHalo3_WLHMTxt_2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070910/d3517a2c/attachment.htm>


More information about the MapServer-users mailing list