[Mapserver-users] EXTENT and PROJECTION

Pericles S. Nacionales nacional at cbs.umn.edu
Mon Apr 26 14:58:51 EDT 2004


Ethan,

First, your extent is most certainly correct.  This leaves you with
three possibilities: 
1. The web server user account doesn't have read access to your data,
2. Your DATA path isn't pointing to your data,
3. You compiled MapServer with GDAL and TIFF support.

You can check the third possibility by running "./mapserv -v" from a
terminal/console.  Check if you have "INPUT=TIFF" and "INPUT=GDAL" in
the output--you should only have one or the other, not both.  If you do
have both, you'll need to recompile MapServer with one of the two
options enabled (i.e. if you run configure with "--with-gdal" option,
make sure to also disable the "native" tiff option with
"--without-tiff").  

If you have fixed possibility #3 and still don't see your image, try
appending the full path to your image, like this:
LAYER 
<snip>
  DATA "/path/to/landcvi0201.tif"
<snip>
END

or change the SHAPEPATH value to "/path/to".

If that still doesn't give you an image, check the permission and make
sure that the web user (apache, nobody, or whatever) have read access to
your image.

If this still doesn't fix it, comment out the PROJECTION block and see
if it works.  You only need to define an output PROJECTION if you are
reprojecting on-the-fly (meaning, your input projection is different
from your output projection).  Since your projection doesn't change, you
don't need to define it.

Good luck!
-Perry N.

On Mon, 2004-04-26 at 12:26, Ethan Alpert wrote:
>  
>  
> Hello!
>  
>  
> I spent yesterday scouring the archives of this email list trying to
> find some info that would help me get a handle on displaying geotiff's
> from my mapserver. I found plenty of posts that ask the same questions
> but no responses.  :/
>  
> I promise to write up a summary if someone can point me in the right
> direction.
>  
> I've learned that if you bork the projection and extents in your
> mapfile you end up with a nice blank image and no error message. I'm
> somewhat at a loss as to how to go about debugging. So my question is
> given the following info about a geotiff how do you experts go about
> setting up PROJECTION and EXTENT?
>  
> Here's the output of listgeo on my image:
>  
> Geotiff_Information:
>    Version: 1
>    Key_Revision: 1.0
>    Tagged_Information:
>       ModelTiepointTag (2,3):
>          0                0                0
>          -5760628         4488331          0
>       ModelPixelScaleTag (1,3):
>          1001.042         1001.042         0
>       End_Of_Tags.
>    Keyed_Information:
>       GTModelTypeGeoKey (Short,1): ModelTypeProjected
>       GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
>       GTCitationGeoKey (Ascii,31): "TIFF 6.0, GeoTIFF Revision 1.0"
>       GeographicTypeGeoKey (Short,1): GCS_WGS_84
>       GeogCitationGeoKey (Ascii,157): "Actual datum is nonstandard,
> based on sphere with radius 6370997 meters.  Coded in GeoTIFF as WGS84
> datum.  The difference is not significant at this scale."
>       ProjectedCSTypeGeoKey (Short,1): User-Defined
>       PCSCitationGeoKey (Ascii,117): "Lambert Azimuthal Equal Area
> projection with arbitrary plane grid; projection center 100.0 degrees
> W, 45.0 degrees N"
>       ProjCoordTransGeoKey (Short,1): CT_LambertAzimEqualArea
>       ProjLinearUnitsGeoKey (Short,1): Linear_Meter
>       ProjCenterLongGeoKey (Double,1): -100
>       ProjCenterLatGeoKey (Double,1): 45
>       End_Of_Keys.
>    End_Of_Geotiff.
>  
> Projection Method: CT_LambertAzimEqualArea
>    ProjCenterLatGeoKey: 45.000000 ( 45d 0' 0.00"N)
>    ProjCenterLongGeoKey: -100.000000 (100d 0' 0.00"W)
>    ProjFalseEastingGeoKey: 0.000000 m
>    ProjFalseNorthingGeoKey: 0.000000 m
> GCS: 4326/WGS 84
> Datum: 6326/World Geodetic System 1984
> Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
> Prime Meridian: 8901/Greenwich (0.000000/  0d 0' 0.00"E)
> Projection Linear Units: 9001/metre (1.000000m)
>  
> PROJ.4 Definition: +proj=laea +lat_0=45.000000000
> +lon_0=-100.000000000 +x_0=0.000 +y_0=0.000 +ellps=WGS84 +units=m
>  
> Corner Coordinates:
> Upper Left    (-5760628.000,4488331.000)  (157d29'26.96"E, 40d47'
> 8.71"N)
> Lower Left    (-5760628.000,-2784239.130)  (151d38'58.71"W, 
> 4d43'23.63"N)
> Upper Right   (4279823.260,4488331.000)  (  4d 0'39.82"W, 53d59'
> 8.05"N)
> Lower Right   (4279823.260,-2784239.130)  ( 61d 9'17.99"W, 11d18'
> 6.31"N)
> Center        (-740402.370, 852045.935)  (110d51' 5.84"W,
> 52d12'27.42"N)
> 
>  
> Here's the borked map file I wrote:
>  
> MAP
>   IMAGETYPE PNG
>   SIZE 600 600
>   SHAPEPATH "data"
>   EXTENT -5760628.000 -2784239.130 4279823.260 4488331.000
>  
>   PROJECTION
>       "proj=laea"
>       "lat_0=45.000000000"
>       "lon_0=-100.000000000"
>       "x_0=0.000"
>       "y_0=0.000"
>       "ellps=WGS84"
>       "units=m"
>   END
>  
>  
>  
>   WEB
>     LOG "/var/www/ms.log"
>   END
>  
>   LAYER
>     NAME land
>     DATA landcvi0201.tif
>     STATUS DEFAULT
>     TYPE RASTER
>  
>   END
> END 
> 
>  
> I've tried all kinds of permutations. I'm assuming the extents should
> be something other than the extents provided by listgeo but I haven't
> any idea what they should be and would like to know what others do
> when the get a new image to come up with appropriate extents.
>  
> Thanks!
>  
> -ethan




More information about the mapserver-users mailing list