I have a set of aerial georeferenced tiff and tfw files, I want to be able to access them using MapServer.

Now the mapfile requires an EXTENT parameter with coordinates which i think they are already specified in the .tfw I was hopping for something like this

  EXTENT         "0232BC_23.tfw"
  SIZE           400 300
  IMAGECOLOR     255 255 255

        NAME "0232BC_23"
        DATA "0232BC_23.tif"
         STATUS ON

any idea to make this work?


You can't use the EXTENT in that way.

EXTENT is expecting a string of minx miny maxx maxy values, like:

EXTENT -8.6476 49.8639 1.76943 60.8622

You can use gdalinfo to get the extents of your raster file:

gdalinfo /path/to/0232BC_23.tif
  • but i already have coordinates on my tfw files... can't i use them? – konzo Aug 3 '16 at 7:13
  • And the look ugly 0.500000000000000000 0.0 0.0 -0.500000000000000000 466365.91103273828 9729699.6079745516 – konzo Aug 3 '16 at 7:14
  • In the extent parameter you must explicitly state the extent values, you can't do it by reference in the way you are trying. – nmtoken Aug 3 '16 at 7:16
  • Do you have GDAL? – nmtoken Aug 3 '16 at 7:17
  • Yes i have Gdal – konzo Aug 3 '16 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.