[Mapserver-users] geotiff output problem
Aaron D. Hunt
hunt at zedxinc.com
Tue Jan 27 08:50:21 PST 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> </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> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> </DIV>
<DIV><BR>Geotiff_Information:<BR> Version: 1<BR> =
Key_Revision: 1.0<BR> =20
Tagged_Information:<BR> =20
End_Of_Tags.<BR> =20
Keyed_Information:<BR> =20
End_Of_Keys.<BR> End_Of_Geotiff.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV><FONT face=3DArial =
size=3D2>
<DIV><BR>Corner Coordinates:<BR> ... unable to transform points =
between=20
pixel/line and PCS space</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Mapserver 4.0.1 <BR>./configure =
<BR>--without-tiff =20
<BR>--without-libtiff<BR>--without-eppl =
<BR>--with-jpeg =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 =
<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> </DIV>
<DIV>gdal</DIV>
<DIV> ./configure --with-libtiff=3D/home/mapserver =
</DIV>
<DIV>--with-geotiff=3D/home/mapserver </DIV>
<DIV> --with-libz </DIV>
<DIV> --with-png </DIV>
<DIV> --with-jpeg </DIV>
<DIV>--without-jasper </DIV>
<DIV>--without-python --prefix=3D/home/mapserver/</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Perl</DIV>
<DIV>#!/usr/bin/perl</DIV>
<DIV> </DIV>
<DIV>use lib("/home/mapserver");<BR>use mapscript40;</DIV>
<DIV> </DIV>
<DIV>$ENV{MS_ERRORFILE} =3D "mapserver.log"; <BR>$ENV{PROJ_LIB} =3D=20
"/home/mapserver/proj-4.4.7/nad/"; </DIV>
<DIV> </DIV>
<DIV>my $map =3D new mapscript40::mapObj("geotif.map") or die("Unable to =
open=20
mapfile. $!");</DIV>
<DIV> </DIV>
<DIV>$img =3D $map->draw() or die('Unable to draw map');</DIV>
<DIV> </DIV>
<DIV>$imagename =3D "test.tiff";</DIV>
<DIV> </DIV>
<DIV>$img->save($imagename);</DIV>
<DIV> </DIV>
<DIV>Map file</DIV>
<DIV> </DIV>
<DIV>#<BR># Start of map file<BR>#<BR>NAME Demo<BR>STATUS ON<BR>SIZE 500 =
500</DIV>
<DIV> </DIV>
<DIV>EXTENT 720138 3723926 721518 3724986 </DIV>
<DIV> </DIV>
<DIV><BR>SHAPEPATH "/tmp"<BR>IMAGECOLOR 255 255 255</DIV>
<DIV> </DIV>
<DIV> WEB<BR> IMAGEPATH "/home/hunt/"<BR> =
IMAGEURL=20
""<BR> END</DIV>
<DIV> </DIV>
<DIV> PROJECTION<BR> "init=3Depsg:26915"<BR> END</DI=
V>
<DIV> </DIV>
<DIV> OUTPUTFORMAT<BR> NAME GTiff<BR> =
DRIVER=20
"GDAL/GTiff"<BR> MIMETYPE "image/tiff"<BR> IMAGEMODE=20
RGB<BR> EXTENSION "tif"<BR> END</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> LAYER<BR> NAME =
ortho-15<BR> =20
METADATA<BR> "wms_title" "USGS Digital=20
Ortho-Quadrangles"<BR> =
"wms_srs" =20
"EPSG:26915" #NAD83 UTM zone 15N<BR> =20
#"wms_latlonboundingbox" "-78 0 -72 =
90"<BR> =20
LYRNAME "DOQs (orthophotos)"<BR> 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> =20
END<BR> #MAXSCALE 700000<BR> =
#MINSCALE=20
5401<BR> OFFSITE 255 255 255<BR> =
GROUP=20
"ORTHO DATA"<BR> STATUS ON<BR> TYPE=20
RASTER<BR> CONNECTIONTYPE WMS<BR> =
CONNECTION=20
"<A=20
href=3D"http://terraservice.net/ogcmap.ashx?VERSION=3D1.1.1&SERVICE=3D=
wms&LAYERS=3DDOQ&FORMAT=3Dimage/jpeg&styles">http://terraserv=
ice.net/ogcmap.ashx?VERSION=3D1.1.1&SERVICE=3Dwms&LAYERS=3DDOQ&am=
p;FORMAT=3Dimage/jpeg&styles</A>=3D"<BR> =20
PROJECTION<BR> "init=3Depsg:26915" #NAD83 =
UTM zone=20
15N<BR> END<BR> END</DIV>
<DIV> </DIV>
<DIV>END<BR></DIV></FONT></BODY></HTML>
------=_NextPart_000_003B_01C3E4CB.BE0839D0--
More information about the MapServer-users
mailing list