[mapserver-users] Rotating a map
Frank Warmerdam
warmerdam at pobox.com
Thu Jan 10 17:49:40 PST 2002
Tyler Mitchell wrote:
> Hi guys, what would you do to rotate the orientation of your map? Is
> using Proj realistic or not?
> I saw some emails back in July about this question - has anyone gone
> anywhere with this idea?
Tyler,
I have successfully used the resampling code in MapServer to do some
rotation of an ortho image. In my particular test the georeferencing
information in a GeoTIFF file included rotational coefficients as shown
here:
warmerda at gdal[483]% listgeo small.tif
Geotiff_Information:
Version: 1
Key_Revision: 1.0
Tagged_Information:
ModelTransformationTag (4,4):
0.999978707 -0.0065257527 0 467086.89
-0.0065257527 -0.999978707 0 5365917.48
0 0 0 0
0 0 0 1
End_Of_Tags.
Keyed_Information:
End_Of_Keys.
End_Of_Geotiff.
As it happens GDAL will read these in and use these rotational coefficients
when going through the resampling process, so the image gets rotated back
to north-up. You can accomplish the same thing by putting rotational
coefficients in a world file. The above file would have a world file that
looks like this:
warmerda at gdal[487]% more small.tfw
0.9999787070
-0.0065257531
-0.0065257527
-0.9999787072
467087.3871740954
5365916.9739565337
Please feel free to contact me if you have problems settings this up and
doing it. It is a rather esoteric use of the mapserver resampling logic.
PS. I have placed this text in the Wiki as:
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?RotatingImages
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list