[mapserver-users] Figuring out pixel size for .wld and raster imags

stevek at avernus.net stevek at avernus.net
Fri Sep 20 10:40:42 EDT 2002


Hi all,

I'm having problems getting mapserver to produce anything other than
a 28x30 broken image. I'm working currently with a raster image,
just trying to get it to even display, never mind actually putting
points up.

My raster image is as follows:
orig.tiff TIFF 1445x1044 DirectClass 8-bit 2474Kb 1.3u 0:02

I know the GPS co-ordinates of the top left and bottom right:
Top left is: -6.430508, 53.432611
Bottom right is: -6.065211, 53.263772

Does this mean the pixel size is as follows?
X pixel size: -0.000257
Y pixel size: 0.000005

Here is my world file:
-0.000257
0.0
0.0
0.000005
-6.424875
53.26377

Here is my map.map file:
NAME test
STATUS on
SIZE 600 600 # set size of output image
EXTENT -6.430508 53.432611 -6.065211 53.263772

UNITS DD
SHAPEPATH "data"
IMAGECOLOR 255 255 255                  # set background colour of image
IMAGETYPE jpeg

#
# Start of web interface definition
#
WEB
 LOG "./mapserv.log"
 TEMPLATE template.html
 IMAGEPATH "./mapserv/"
 IMAGEURL "/mapserv/"
 METADATA
  WMS_TITLE "testing"
  WMS_ABSTRACT "abstract"
  WMS_ACCESSCONSTRAINTS none
  WMS_ONLINERESOURCE "http://www.foobar.org/test"
 END
END

SCALEBAR
 IMAGECOLOR 255 255 255
 LABEL
  COLOR 0 0 0
  SIZE SMALL
 END
SIZE 350 5
COLOR 255 255 255
BACKGROUNDCOLOR 0 0 0
OUTLINECOLOR 0 0 0
UNITS MILES
INTERVALS 5
STATUS on
END

LAYER
  NAME "map1"
  TYPE RASTER
  STATUS OFF
  DATA "orig.tiff"
 CLASS
  NAME "Map1"
  END
END

END

Steve Kennedy





More information about the mapserver-users mailing list