[Mapserver-users] geotiff output problem

Aaron D. Hunt hunt at zedxinc.com
Tue Jan 27 11:50:21 EST 2004


This is a multi-part message in MIME format.

------=_NextPart_000_003B_01C3E4CB.BE0839D0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I am trying to get mapserver to output geotiffs. When I do so the tiff =
is made fine but the geo in-coding is blank (see listgeo out put below). =
I have mapserver 4.0.1 with gdal-cvs-031112, tiff-v3.6.0 and =
libgeotiff-1.2.1 on redhat 9.0 (configure call below). The perl script =
and Map file I am using is also bellow. Does anyone have any ideas.

Thank You
Aaron Hunt




Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
      End_Of_Tags.
   Keyed_Information:
      End_Of_Keys.
   End_Of_Geotiff.


Corner Coordinates:
 ... unable to transform points between pixel/line and PCS space


Mapserver 4.0.1=20
./configure=20
--without-tiff   =20
--without-libtiff
--without-eppl   =20
--with-jpeg =20
--with-proj=3D/home/mapserver/=20
--with-gdal=3D/home/mapserver/bin/gdal-config=20
--with-ogr=3D/home/mapserver/bin/gdal-config =20
--with-wmsclient=20
--with-freetype=3D/home/mapserver/=20
--with-gd=3D/home/mapserver/=20
--with-php=3D/usr/local/src/php-4.3.4/=20
--with-curl-config=3D/home/mapserver/bin/curl-config=20
--with-ming=20
--with-postgis=3D/usr/local/pgsql/bin/pg_config

gdal
 ./configure  --with-libtiff=3D/home/mapserver =20
--with-geotiff=3D/home/mapserver =20
 --with-libz=20
 --with-png =20
 --with-jpeg =20
--without-jasper =20
--without-python --prefix=3D/home/mapserver/


Perl
#!/usr/bin/perl

use lib("/home/mapserver");
use mapscript40;

$ENV{MS_ERRORFILE} =3D "mapserver.log";=20
$ENV{PROJ_LIB} =3D "/home/mapserver/proj-4.4.7/nad/";=20

my $map =3D new mapscript40::mapObj("geotif.map") or die("Unable to open =
mapfile. $!");

$img =3D $map->draw() or die('Unable to draw map');

$imagename =3D "test.tiff";

$img->save($imagename);

Map file

#
# Start of map file
#
NAME Demo
STATUS ON
SIZE 500 500

EXTENT 720138 3723926 721518 3724986=20


SHAPEPATH "/tmp"
IMAGECOLOR 255 255 255

 WEB
   IMAGEPATH "/home/hunt/"
   IMAGEURL ""
 END

 PROJECTION
  "init=3Depsg:26915"
 END

 OUTPUTFORMAT
   NAME GTiff
   DRIVER "GDAL/GTiff"
  MIMETYPE "image/tiff"
  IMAGEMODE RGB
   EXTENSION "tif"
 END



 LAYER
    NAME ortho-15
    METADATA
      "wms_title" "USGS Digital Ortho-Quadrangles"
      "wms_srs"   "EPSG:26915" #NAD83 UTM zone 15N
      #"wms_latlonboundingbox" "-78 0 -72 90"
      LYRNAME "DOQs (orthophotos)"
      LINK =
"http://terraserver.microsoft.com/about.aspx?n=3DAboutTerraServiceOvervie=
w"
    END
    #MAXSCALE 700000
    #MINSCALE 5401
    OFFSITE 255 255 255
    GROUP "ORTHO DATA"
    STATUS ON
    TYPE RASTER
    CONNECTIONTYPE WMS
    CONNECTION =
"http://terraservice.net/ogcmap.ashx?VERSION=3D1.1.1&SERVICE=3Dwms&LAYERS=
=3DDOQ&FORMAT=3Dimage/jpeg&styles=3D"
    PROJECTION
      "init=3Depsg:26915" #NAD83 UTM zone 15N
    END
 END

END

------=_NextPart_000_003B_01C3E4CB.BE0839D0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I am trying to get mapserver to output =
geotiffs.=20
When I do so the tiff is made fine but the geo in-coding is blank (see =
listgeo=20
out put below). I have mapserver 4.0.1 with gdal-cvs-031112, tiff-v3.6.0 =
and=20
libgeotiff-1.2.1 on redhat 9.0 (configure call below). The perl script =
and Map=20
file I am using is also bellow. Does anyone have any ideas.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thank You</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Aaron Hunt</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV>
<DIV><BR>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;=20
End_Of_Tags.<BR>&nbsp;&nbsp;=20
Keyed_Information:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
End_Of_Keys.<BR>&nbsp;&nbsp; End_Of_Geotiff.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV><FONT face=3DArial =
size=3D2>
<DIV><BR>Corner Coordinates:<BR>&nbsp;... unable to transform points =
between=20
pixel/line and PCS space</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Mapserver 4.0.1 <BR>./configure =
<BR>--without-tiff&nbsp;&nbsp;&nbsp;=20
<BR>--without-libtiff<BR>--without-eppl&nbsp;&nbsp;&nbsp; =
<BR>--with-jpeg&nbsp;=20
<BR>--with-proj=3D/home/mapserver/ =
<BR>--with-gdal=3D/home/mapserver/bin/gdal-config=20
<BR>--with-ogr=3D/home/mapserver/bin/gdal-config&nbsp; =
<BR>--with-wmsclient=20
<BR>--with-freetype=3D/home/mapserver/ <BR>--with-gd=3D/home/mapserver/=20
<BR>--with-php=3D/usr/local/src/php-4.3.4/=20
<BR>--with-curl-config=3D/home/mapserver/bin/curl-config <BR>--with-ming =

<BR>--with-postgis=3D/usr/local/pgsql/bin/pg_config</DIV>
<DIV>&nbsp;</DIV>
<DIV>gdal</DIV>
<DIV>&nbsp;./configure&nbsp; --with-libtiff=3D/home/mapserver&nbsp; =
</DIV>
<DIV>--with-geotiff=3D/home/mapserver&nbsp;&nbsp;</DIV>
<DIV>&nbsp;--with-libz&nbsp;</DIV>
<DIV>&nbsp;--with-png&nbsp;&nbsp;</DIV>
<DIV>&nbsp;--with-jpeg&nbsp; </DIV>
<DIV>--without-jasper&nbsp; </DIV>
<DIV>--without-python --prefix=3D/home/mapserver/</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Perl</DIV>
<DIV>#!/usr/bin/perl</DIV>
<DIV>&nbsp;</DIV>
<DIV>use lib("/home/mapserver");<BR>use mapscript40;</DIV>
<DIV>&nbsp;</DIV>
<DIV>$ENV{MS_ERRORFILE} =3D "mapserver.log"; <BR>$ENV{PROJ_LIB} =3D=20
"/home/mapserver/proj-4.4.7/nad/"; </DIV>
<DIV>&nbsp;</DIV>
<DIV>my $map =3D new mapscript40::mapObj("geotif.map") or die("Unable to =
open=20
mapfile. $!");</DIV>
<DIV>&nbsp;</DIV>
<DIV>$img =3D $map-&gt;draw() or die('Unable to draw map');</DIV>
<DIV>&nbsp;</DIV>
<DIV>$imagename =3D "test.tiff";</DIV>
<DIV>&nbsp;</DIV>
<DIV>$img-&gt;save($imagename);</DIV>
<DIV>&nbsp;</DIV>
<DIV>Map file</DIV>
<DIV>&nbsp;</DIV>
<DIV>#<BR># Start of map file<BR>#<BR>NAME Demo<BR>STATUS ON<BR>SIZE 500 =

500</DIV>
<DIV>&nbsp;</DIV>
<DIV>EXTENT 720138 3723926 721518 3724986 </DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>SHAPEPATH "/tmp"<BR>IMAGECOLOR 255 255 255</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;WEB<BR>&nbsp;&nbsp; IMAGEPATH "/home/hunt/"<BR>&nbsp;&nbsp; =
IMAGEURL=20
""<BR>&nbsp;END</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;PROJECTION<BR>&nbsp;&nbsp;"init=3Depsg:26915"<BR>&nbsp;END</DI=
V>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;OUTPUTFORMAT<BR>&nbsp;&nbsp; NAME GTiff<BR>&nbsp;&nbsp; =
DRIVER=20
"GDAL/GTiff"<BR>&nbsp; MIMETYPE "image/tiff"<BR>&nbsp; IMAGEMODE=20
RGB<BR>&nbsp;&nbsp; EXTENSION "tif"<BR>&nbsp;END</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;LAYER<BR>&nbsp;&nbsp;&nbsp; NAME =
ortho-15<BR>&nbsp;&nbsp;&nbsp;=20
METADATA<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "wms_title" "USGS Digital=20
Ortho-Quadrangles"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
"wms_srs"&nbsp;&nbsp;=20
"EPSG:26915" #NAD83 UTM zone 15N<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
#"wms_latlonboundingbox" "-78 0 -72 =
90"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
LYRNAME "DOQs (orthophotos)"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LINK "<A=20
href=3D"http://terraserver.microsoft.com/about.aspx?n=3DAboutTerraService=
Overview">http://terraserver.microsoft.com/about.aspx?n=3DAboutTerraServi=
ceOverview</A>"<BR>&nbsp;&nbsp;&nbsp;=20
END<BR>&nbsp;&nbsp;&nbsp; #MAXSCALE 700000<BR>&nbsp;&nbsp;&nbsp; =
#MINSCALE=20
5401<BR>&nbsp;&nbsp;&nbsp; OFFSITE 255 255 255<BR>&nbsp;&nbsp;&nbsp; =
GROUP=20
"ORTHO DATA"<BR>&nbsp;&nbsp;&nbsp; STATUS ON<BR>&nbsp;&nbsp;&nbsp; TYPE=20
RASTER<BR>&nbsp;&nbsp;&nbsp; CONNECTIONTYPE WMS<BR>&nbsp;&nbsp;&nbsp; =
CONNECTION=20
"<A=20
href=3D"http://terraservice.net/ogcmap.ashx?VERSION=3D1.1.1&amp;SERVICE=3D=
wms&amp;LAYERS=3DDOQ&amp;FORMAT=3Dimage/jpeg&amp;styles">http://terraserv=
ice.net/ogcmap.ashx?VERSION=3D1.1.1&amp;SERVICE=3Dwms&amp;LAYERS=3DDOQ&am=
p;FORMAT=3Dimage/jpeg&amp;styles</A>=3D"<BR>&nbsp;&nbsp;&nbsp;=20
PROJECTION<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "init=3Depsg:26915" #NAD83 =
UTM zone=20
15N<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp;END</DIV>
<DIV>&nbsp;</DIV>
<DIV>END<BR></DIV></FONT></BODY></HTML>

------=_NextPart_000_003B_01C3E4CB.BE0839D0--




More information about the mapserver-users mailing list