Carl,
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....
One work-around would be to convert the tif/tab to geofiff (see
http://www.gisnotes.com/wordpress/2007/06/processing-mapinfo-raster-jpeg-images-using-gdal/)
Best Regards,
Brent Fraser
On 1/24/2011 2:57 AM, Carl Burn wrote:
Hello All,
I am a newcomer to this list so forgive me if I make any blunders.
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:
======= TAB File ==================
!table
!version 300
!charset WindowsLatin1
Definition Table
File "MiniScalenogrid.tif"
Type "RASTER"
(0,0) (0,13000) Label "Pt 1",
(700000,0) (7000,13000) Label "Pt 2",
(700000,1300000) (7000,0) Label "Pt 3",
(0,1300000) (0,0) Label "Pt 4"
CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717, 400000,
-100000
Units "m"
RasterStyle 7 0
========Tab File ends =======================
The mapfile is below:
========== Map file =========================
MAP
NAME "osminiscale"
# Map image size
SIZE 800 800
UNITS meters
EXTENT 41069.1 -1149.02 665378.01 1231178.57
FONTSET './etc/fonts.txt'
SYMBOLSET './etc/symbols.sym'
PROJECTION
'init=epsg:27700'
END
# Background color for the map canvas -- change as desired
IMAGECOLOR 255 255 255
IMAGEQUALITY 95
IMAGETYPE png
OUTPUTFORMAT
NAME png
DRIVER 'GD/PNG'
MIMETYPE 'image/png'
IMAGEMODE RGBA
EXTENSION 'png'
END
# Legend
LEGEND
IMAGECOLOR 255 255 255
STATUS OFF
KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
END
# Web interface definition. Only the template parameter
# is required to display a map. See MapServer documentation
WEB
# Set IMAGEPATH to the path where MapServer should
# write its output.
IMAGEPATH '/tmp/'
# Set IMAGEURL to the url that points to IMAGEPATH
# as defined in your web server configuration
IMAGEURL '/tmp/'
# WMS server settings
METADATA
'ows_title' 'miniscale'
'ows_onlineresource'
'http://www.foobar.com/cgi-bin/mapserv.exe?map=D:/ms4w/Apache/cgi-bin/osminiscale.map'
'ows_srs' 'EPSG:27700'
END
#Scale range at which web interface will operate
# Template and header/footer settings
# Only the template parameter is required to display a map. See
MapServer documentation
TEMPLATE 'fooOnlyForWMSGetFeatureInfo'
END
LAYER
NAME 'MiniScalenogrid'
TYPE RASTER
DUMP true
TEMPLATE fooOnlyForWMSGetFeatureInfo
EXTENT 41069.1 -1149.02 665378.01 1231178.57
DATA 'D:/opendata/minisc_gb/MiniScale/data/MiniScalenogrid.tif'
METADATA
'ows_title' 'MiniScalenogrid'
'ows_srs' 'EPSG:27700'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'init=epsg:27700'
END
END
LAYER
NAME 'MiniScalewithgrid'
TYPE RASTER
DUMP true
TEMPLATE fooOnlyForWMSGetFeatureInfo
EXTENT 41069.1 -1149.02 665378.01 1231178.57
DATA 'D:/opendata/minisc_gb/MiniScale/data/MiniScalewithgrid.tif'
METADATA
'ows_title' 'MiniScalewithgrid'
'ows_srs' 'EPSG:27700'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'init=epsg:27700'
END
END
END
============ Map File ends ==========================
I am not getting an image from the map server and have run shp2img
with the following results:
msProcessProjection(): Projection library error. unknown elliptical
parameter name
Any clues or pointers would be great.
Thanks
Burnsy
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users