[Mapserver-users] EXTENT and PROJECTION

Ethan Alpert ealpert at digitalglobe.com
Mon Apr 26 13:26:35 EDT 2004


This is a multi-part message in MIME format.

------_=_NextPart_001_01C42BB3.A021BF77
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

=20
=20
Hello!
=20
=20
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.  :/
=20
I promise to write up a summary if someone can point me in the right
direction.
=20
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?
=20
Here's the output of listgeo on my image:
=20
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.
=20
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)
=20
PROJ.4 Definition: +proj=3Dlaea +lat_0=3D45.000000000 =
+lon_0=3D-100.000000000
+x_0=3D0.000 +y_0=3D0.000 +ellps=3DWGS84 +units=3Dm
=20
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)

=20
Here's the borked map file I wrote:
=20
MAP
  IMAGETYPE PNG
  SIZE 600 600
  SHAPEPATH "data"
  EXTENT -5760628.000 -2784239.130 4279823.260 4488331.000
=20
  PROJECTION
      "proj=3Dlaea"
      "lat_0=3D45.000000000"
      "lon_0=3D-100.000000000"
      "x_0=3D0.000"
      "y_0=3D0.000"
      "ellps=3DWGS84"
      "units=3Dm"
  END
=20
=20
=20
  WEB
    LOG "/var/www/ms.log"
  END
=20
  LAYER
    NAME land
    DATA landcvi0201.tif
    STATUS DEFAULT
    TYPE RASTER
=20
  END
END=20

=20
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.
=20
Thanks!
=20
-ethan

------_=_NextPart_001_01C42BB3.A021BF77
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2>Hello!</FONT></SPAN></DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial size=3D2>I =
spent yesterday=20
scouring the archives of this email list trying to find some info that =
would=20
help me get a handle on displaying geotiff's from my mapserver. I found =
plenty=20
of posts that ask the same questions but no responses.&nbsp;=20
:/</FONT></SPAN></DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial size=3D2>I =
promise to write=20
up a summary if someone can point me in the right =
direction.</FONT></SPAN></DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial size=3D2>I've =
learned that if=20
you bork the projection and extents in your mapfile you end up with a =
nice blank=20
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=20
experts go about setting up PROJECTION and EXTENT?</FONT></SPAN></DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial size=3D2>Here's =
the output of=20
listgeo on my image:</FONT></SPAN></DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2>Geotiff_Information:<BR>&nbsp;&nbsp; Version: 1<BR>&nbsp;&nbsp; =

Key_Revision: 1.0<BR>&nbsp;&nbsp;=20
Tagged_Information:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ModelTiepointTag=20
(2,3):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;=20
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;=20
0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
-5760628&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
4488331&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ModelPixelScaleTag=20
(1,3):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
1001.042&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
1001.042&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End_Of_Tags.<BR>&nbsp;&nbsp;=20
Keyed_Information:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GTModelTypeGeoKey=20
(Short,1): ModelTypeProjected<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
GTRasterTypeGeoKey (Short,1):=20
RasterPixelIsArea<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GTCitationGeoKey =
(Ascii,31):=20
"TIFF 6.0, GeoTIFF Revision 1.0"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
GeographicTypeGeoKey (Short,1): =
GCS_WGS_84<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
GeogCitationGeoKey (Ascii,157): "Actual datum is nonstandard, based on =
sphere=20
with radius 6370997 meters.&nbsp; Coded in GeoTIFF as WGS84 datum.&nbsp; =
The=20
difference is not significant at this =
scale."<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
ProjectedCSTypeGeoKey (Short,1): =
User-Defined<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
PCSCitationGeoKey (Ascii,117): "Lambert Azimuthal Equal Area projection =
with=20
arbitrary plane grid; projection center 100.0 degrees W, 45.0 degrees=20
N"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ProjCoordTransGeoKey (Short,1):=20
CT_LambertAzimEqualArea<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ProjLinearUnitsGeoKey=20
(Short,1): Linear_Meter<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ProjCenterLongGeoKey=20
(Double,1): -100<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ProjCenterLatGeoKey=20
(Double,1): 45<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
End_Of_Keys.<BR>&nbsp;&nbsp;=20
End_Of_Geotiff.</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial =
size=3D2>Projection Method:=20
CT_LambertAzimEqualArea<BR>&nbsp;&nbsp; ProjCenterLatGeoKey: 45.000000 ( =
45d 0'=20
0.00"N)<BR>&nbsp;&nbsp; ProjCenterLongGeoKey: -100.000000 (100d 0'=20
0.00"W)<BR>&nbsp;&nbsp; ProjFalseEastingGeoKey: 0.000000 =
m<BR>&nbsp;&nbsp;=20
ProjFalseNorthingGeoKey: 0.000000 m<BR>GCS: 4326/WGS 84<BR>Datum: =
6326/World=20
Geodetic System 1984<BR>Ellipsoid: 7030/WGS 84 =
(6378137.00,6356752.31)<BR>Prime=20
Meridian: 8901/Greenwich (0.000000/&nbsp; 0d 0' 0.00"E)<BR>Projection =
Linear=20
Units: 9001/metre (1.000000m)</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial size=3D2>PROJ.4 =
Definition:=20
+proj=3Dlaea +lat_0=3D45.000000000 +lon_0=3D-100.000000000 +x_0=3D0.000 =
+y_0=3D0.000=20
+ellps=3DWGS84 +units=3Dm</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial size=3D2>Corner =

Coordinates:<BR>Upper Left&nbsp;&nbsp;&nbsp; =
(-5760628.000,4488331.000)&nbsp;=20
(157d29'26.96"E, 40d47' 8.71"N)<BR>Lower Left&nbsp;&nbsp;&nbsp;=20
(-5760628.000,-2784239.130)&nbsp; (151d38'58.71"W,&nbsp; =
4d43'23.63"N)<BR>Upper=20
Right&nbsp;&nbsp; (4279823.260,4488331.000)&nbsp; (&nbsp; 4d 0'39.82"W, =
53d59'=20
8.05"N)<BR>Lower Right&nbsp;&nbsp; (4279823.260,-2784239.130)&nbsp; ( =
61d=20
9'17.99"W, 11d18' =
6.31"N)<BR>Center&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
(-740402.370, 852045.935)&nbsp; (110d51' 5.84"W,=20
52d12'27.42"N)<BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial size=3D2>Here's =
the borked=20
map file I wrote:</FONT></SPAN></DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial =
size=3D2></FONT></SPAN><SPAN=20
class=3D727181517-26042004><FONT face=3DArial size=3D2>MAP<BR>&nbsp; =
IMAGETYPE=20
PNG<BR>&nbsp; SIZE 600 600<BR>&nbsp; SHAPEPATH "data"<BR>&nbsp; EXTENT=20
-5760628.000 -2784239.130 4279823.260 4488331.000</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial size=3D2>&nbsp; =

PROJECTION<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
"proj=3Dlaea"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
"lat_0=3D45.000000000"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
"lon_0=3D-100.000000000"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
"x_0=3D0.000"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
"y_0=3D0.000"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
"ellps=3DWGS84"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "units=3Dm"<BR>&nbsp;=20
END</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial size=3D2>&nbsp; =

WEB<BR>&nbsp;&nbsp;&nbsp; LOG "/var/www/ms.log"<BR>&nbsp;=20
END</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial size=3D2>&nbsp; =

LAYER<BR>&nbsp;&nbsp;&nbsp; NAME land<BR>&nbsp;&nbsp;&nbsp; DATA=20
landcvi0201.tif<BR>&nbsp;&nbsp;&nbsp; STATUS =
DEFAULT<BR>&nbsp;&nbsp;&nbsp; TYPE=20
RASTER</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial size=3D2>&nbsp; =
END<BR>END=20
<BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial size=3D2>I've =
tried all kinds=20
of permutations. I'm assuming the extents should be something other than =
the=20
extents provided by listgeo but I haven't any idea what they should be =
and would=20
like to know what others do when the get a new image to come up with =
appropriate=20
extents.</FONT></SPAN></DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2>Thanks!</FONT></SPAN></DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D727181517-26042004><FONT face=3DArial=20
size=3D2>-ethan</DIV></FONT></SPAN></BODY></HTML>
=00
------_=_NextPart_001_01C42BB3.A021BF77--



More information about the mapserver-users mailing list