[Mapserver-users] Raster: rotation params in WLD file

Frank Warmerdam warmerdam at pobox.com
Sat Feb 22 10:01:44 PST 2003


Marian Grigoras wrote:
> Hello,
>  
> Could someone please clarify what the 2nd and the 3rd paratemers in a 
> .WLD file mean?
> All that I could find on the topic is that they are normally 0.00 :-)) 
> and that is not very
> encouraging if I want to define some raster maps that are not 
> North-oriented.
> I tried to play with the parameters blindly, but I did not notice any 
> change in the output
> image, whatever I write on these 2 lines. Are these parameters supported 
> at all?

Marian,

They are rotational coefficients.

If W[i] is one of lines 0 through 5 of the world file you can calculate
the georeferenced location of pixel [Xr,Yr] as:

  Xgeo = W[4] + W[0] * Xr + W[2] * Yr
  Ygeo = W[5] + W[4] * Xr + W[3] * Yr

Most of the worldfile handling in mapserver ignores the rotational
coefficients, but if you handle a raster through GDAL in MapServer then it
can be rotated properly to display in MapServer.

Note that MapServer does not support producing rotated map results.  They
are always north up.

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