Hello,
Here are my quick thoughts:
- remove all projection objects from your mapfile
- remove all layers from your mapfile except the one raster/tif layer
- use the ogrinfo utility, which is included in MS4W, to get the extents
of your tif file (http://www.gdal.org/ogrinfo.html)
- use those extents in your mapfile's EXTENT parameter
- test your mapfile with the shp2img utility, which is also included in
MS4W (http://www.mapserver.org/utilities/shp2img.html)
- note that MS4W is already configured for the following IMAGEPATH and
IMAGEURL parameters:
IMAGEPATH "/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
(the above imagepath value assumes that you have MS4W installed at a
root of a drive...if you used the setup.exe installer you might have
installed it elsewhere, so that imagepath value might be different)
Hope those quick thoughts help.
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
On 11-01-24 5: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