[Mapserver-users] EXTENT and PROJECTION

Tyler Mitchell TMitchell at lignum.com
Mon Apr 26 11:38:18 PDT 2004


Try adding the same PROJECTION section within the input LAYER...END 
section as well. 
Just copy/paste the projection you have for the output map right before 
the end of the layer.

If you're still stumped you can then change the map projection (not in 
layer) to lat/long and change your extent to cover a larger area (i.e. 
-180 -90 180 90 - all of earth) and see if it shows up somewhere on the 
planet :)

I think what many people do is they open the image in another program 
(openev, arcview, etc.) and check the extent coordinates manually to 
verify.

Tyler


> 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!
> 


mapserver-users-admin at lists.gis.umn.edu wrote on 04/26/2004 10:26:35 AM:

> 
> 
> 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 
rightdirection.
> 
> 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