<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Carl,<br>
<br>
Mapserver is likely trying to use it's native tif driver to open
the file and not finding the georeferencing information in the .tab
file (it doesn't know anything about .tab files). Mapserver can
use GDAL to access raster data, and I think GDAL can get the
georeferencing info from a .tab file, but I don't know of any way
to force Mapserver to use the GDAL driver for tif files. Maybe if
you renamed the .tif to .tiff (and change the string in the .tab
file). Interesting problem....<br>
<br>
One work-around would be to convert the tif/tab to geofiff (see
<a class="moz-txt-link-freetext" href="http://www.gisnotes.com/wordpress/2007/06/processing-mapinfo-raster-jpeg-images-using-gdal/">http://www.gisnotes.com/wordpress/2007/06/processing-mapinfo-raster-jpeg-images-using-gdal/</a>)<br>
<pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
<br>
On 1/24/2011 2:57 AM, Carl Burn wrote:
<blockquote
cite="mid:AANLkTin6QmrZS=tpsq1hVczvVqzriLaWZg5DhBUjx9rs@mail.gmail.com"
type="cite">Hello All,<br>
<br>
I am a newcomer to this list so forgive me if I make any blunders.<br>
I am trying to render a map image from mapserver using a tif file
which has a georeferencing .tab file in the same folder and I am
getting nowhere with it. The tab file content is as follows:<br>
<br>
======= TAB File ==================<br>
!table<br>
!version 300<br>
!charset WindowsLatin1<br>
<br>
Definition Table<br>
File "MiniScalenogrid.tif"<br>
Type "RASTER"<br>
(0,0) (0,13000) Label "Pt 1",<br>
(700000,0) (7000,13000) Label "Pt 2",<br>
(700000,1300000) (7000,0) Label "Pt 3",<br>
(0,1300000) (0,0) Label "Pt 4"<br>
CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717,
400000, -100000<br>
Units "m"<br>
RasterStyle 7 0<br>
<br>
========Tab File ends =======================<br>
<br>
The mapfile is below:<br>
<br>
========== Map file =========================<br>
<br>
MAP<br>
NAME "osminiscale"<br>
# Map image size<br>
SIZE 800 800<br>
UNITS meters<br>
<br>
EXTENT 41069.1 -1149.02 665378.01 1231178.57<br>
FONTSET './etc/fonts.txt'<br>
SYMBOLSET './etc/symbols.sym'<br>
PROJECTION<br>
'init=epsg:27700'<br>
END<br>
<br>
# Background color for the map canvas -- change as desired<br>
IMAGECOLOR 255 255 255<br>
IMAGEQUALITY 95<br>
IMAGETYPE png<br>
<br>
OUTPUTFORMAT<br>
NAME png<br>
DRIVER 'GD/PNG'<br>
MIMETYPE 'image/png'<br>
IMAGEMODE RGBA<br>
EXTENSION 'png'<br>
END<br>
# Legend<br>
LEGEND<br>
IMAGECOLOR 255 255 255<br>
STATUS OFF<br>
KEYSIZE 18 12<br>
LABEL<br>
TYPE BITMAP<br>
SIZE MEDIUM<br>
COLOR 0 0 89<br>
END<br>
END<br>
<br>
# Web interface definition. Only the template parameter<br>
# is required to display a map. See MapServer documentation<br>
WEB<br>
# Set IMAGEPATH to the path where MapServer should<br>
# write its output.<br>
IMAGEPATH '/tmp/'<br>
<br>
# Set IMAGEURL to the url that points to IMAGEPATH<br>
# as defined in your web server configuration<br>
IMAGEURL '/tmp/'<br>
<br>
# WMS server settings<br>
METADATA<br>
'ows_title' 'miniscale'<br>
'ows_onlineresource' '<a moz-do-not-send="true"
href="http://www.foobar.com/cgi-bin/mapserv.exe?map=D:/ms4w/Apache/cgi-bin/osminiscale.map">http://www.foobar.com/cgi-bin/mapserv.exe?map=D:/ms4w/Apache/cgi-bin/osminiscale.map</a>'<br>
'ows_srs' 'EPSG:27700'<br>
END<br>
<br>
#Scale range at which web interface will operate<br>
# Template and header/footer settings<br>
# Only the template parameter is required to display a map.
See MapServer documentation<br>
TEMPLATE 'fooOnlyForWMSGetFeatureInfo'<br>
END<br>
<br>
LAYER<br>
NAME 'MiniScalenogrid'<br>
TYPE RASTER<br>
DUMP true<br>
TEMPLATE fooOnlyForWMSGetFeatureInfo<br>
EXTENT 41069.1 -1149.02 665378.01 1231178.57<br>
DATA
'D:/opendata/minisc_gb/MiniScale/data/MiniScalenogrid.tif'<br>
METADATA<br>
'ows_title' 'MiniScalenogrid'<br>
'ows_srs' 'EPSG:27700'<br>
END<br>
STATUS OFF<br>
TRANSPARENCY 100<br>
PROJECTION<br>
'init=epsg:27700'<br>
END<br>
END<br>
<br>
LAYER<br>
NAME 'MiniScalewithgrid'<br>
TYPE RASTER<br>
DUMP true<br>
TEMPLATE fooOnlyForWMSGetFeatureInfo<br>
EXTENT 41069.1 -1149.02 665378.01 1231178.57<br>
DATA
'D:/opendata/minisc_gb/MiniScale/data/MiniScalewithgrid.tif'<br>
METADATA<br>
'ows_title' 'MiniScalewithgrid'<br>
'ows_srs' 'EPSG:27700'<br>
END<br>
STATUS OFF<br>
TRANSPARENCY 100<br>
PROJECTION<br>
'init=epsg:27700'<br>
END<br>
END<br>
<br>
END<br>
<br>
<br>
============ Map File ends ==========================<br>
<br>
I am not getting an image from the map server and have run shp2img
with the following results:<br>
<br>
msProcessProjection(): Projection library error. unknown
elliptical parameter name <br>
<br>
Any clues or pointers would be great.<br>
<br>
Thanks<br>
<br>
Burnsy<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
</blockquote>
</body>
</html>