[Mapserver-users] MapServer/gdal doesn't like Photoshop tiff

Marvin Humphrey marvin at rectangular.com
Wed May 19 05:15:30 EDT 2004


Thank you, adding the properly formatted tfw file to the raster 
directory restored the image to the example.

Even better, the information you supplied me enabled me to hack up a 
TFW file for the GLOBE data and successfully bring that into MapServer, 
based on header files downloaded from here...


It struck me that the data in a TFW file would be inadequate for 
representing projected data accurately -- which  pixel in an Albers 
Equal Area Conic projection do you use to define the x and y widths?  
Then I did a little more research and found that GeoTIFF contains a lot 
more than the simple TFW file.  How much distortion am I likely to see 
when I use a TFW instead of a precisely specified projection system?  
Will there be any for the LatLong GLOBE data, or am I inventing a 
problem where none actually exists?  I can't quite wrap my brain around 
the  3 dimensional visualization I need to figure it out. It looks like 
Lake Superior is in the right place more or less at this scale, but 
when I get down to the city level things could be off...

-- Marvin Humphrey

On May 18, 2004, at 11:42 PM, Pericles S. Nacionales wrote:

> This happens because photoshop doesn't support GeoTIFF images.  When 
> you
> open the GeoTIFF image in Photoshop and then save it again, you lose 
> the
> georeferencing.  What you can do to fix it is create what's called a
> world file.  This is a small text file with the following lines (this 
> is
> only valid for the example 1.5 image):
> 0.00473306
> 0.0
> 0.0
> -0.00473306
> -97.3743368
> 49.415919
> If you copy these lines to a text editor and save the file as
> mod09a12003161_ugl_ll_8bit.tfw in the same directory where you have 
> your
> tiff image, your map should then work.  To explain the lines briefly:
> line 1 represents the X dimension of your pixel (in map units)
> I don't really know what lines 2 and 3 are (don't change it unless you
> know what you're doing)
> line 4 is the negative Y dimension of your pixel (it has to be 
> negative)
> line 5 is the upper left X coordinate of the image
> line 6 is the upper left Y coordinate of the image
> You can get these info if you have the GDAL utility program "gdalinfo".
> Go ahead and use photoshop to edit the images but make sure to get the
> pixel dimensions and upper left coordinates of the image before doing
> so.
> Good luck!
> -Perry

More information about the mapserver-users mailing list