[mapserver-users] Mapserver TIF Layer

Fawcett, David David.Fawcett at state.mn.us
Mon Aug 18 09:51:21 EDT 2008


Felix, 
 
Extent defines the bounding box that you want do display as a default
for your map.  The values need to be expressed in the same units as your
output spatial reference system.  (e.g. if your data is in decimal
degrees of lat/long, your extent should be in decimal degrees).  The
format is [minimum x value] [minimum y value] [maximum x value] [maximum
y value] .  UNITS also needs to reflect the units of your output SRS. 
 
Try:  
 
EXTENT -73.795132 40.685928 -74.153979 40.846823 
UNITS dd
 
Unless you are calling the layer by name in the URL request, change
STATUS to DEFAULT to ensure that the layer shows up.
 
David. 
 

	-----Original Message-----
	From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Felix
	Sent: Saturday, August 16, 2008 10:49 AM
	To: mapserver-users at lists.osgeo.org
	Subject: [mapserver-users] Mapserver TIF Layer
	
	
	Hi,
	
	I'm having some difficulty getting a map to show up. I've setup
the latest version of MapServer and I have a TIF with a TFW file.
	
	I don't fully understand how EXTENT works, and I can't find any
decent explanation in the documentation. I'm trying to display a portion
of my map based on latitude and longitude. What do I need to put in my
EXTENT field so that I can get a map with top-left
(40.846823/-74.153979) and bottom-right (40.685928/-73.795132).
	
	Thank you for any assistance!
	
	Felix
	
	Here is my TFW file:
	
	63.545941999999989
	0.0
	0.0
	-63.545941999999989
	-421692.82776298042
	-15874.371420191659
	
	And my Map File:
	
	MAP
	    NAME NY77SOUTH
	    STATUS ON
	    IMAGETYPE PNG
	    SIZE 500 500
	    SHAPEPATH "/var/www/html"
	    #West South East North
	    EXTENT  -421692.82776298042 -15874.371420191659 0 0
	    UNITS METERS
	    PROJECTION 
	    "proj=lcc" 
	    "lat_1=46.666667" 
	    "lat_2=41.333333" 
	    "lon_0=-72.833333" 
	    "lat_0=42.1"
	    "x_0=0.0"
	    "y_0=0.0"
	    "ellps=GRS80" 
	    "datum=NAD83" 
	    END
	        WEB
	            IMAGEPATH "/var/www/html/tmp/"
	            IMAGEURL "/tmp/"
	        END
	
	        LAYER
	            NAME "chart"
	            TYPE RASTER
	            STATUS ON
	            DATA "/var/www/html/NewYork77South.tif"
	        END
	END
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080818/f1b4c92e/attachment-0001.html


More information about the mapserver-users mailing list