[Mapserver-users] Raster: rotation params in WLD file
Marian Grigoras
mgrig at mnet-online.de
Sat Feb 22 11:59:07 PST 2003
Hello Frank,
> 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
I have to admit I did not get the logic behind these formulas.
Intuitively I would say that at least Xr and Yr should be
switched in the Ygeo formula, but don't waste time on explaining if
I am wrong, this is pure speculation.
The point is that I need to understand the real significance af these
parameters, as I will have to compute them for my maps.
What I actually need is to be able to define a rotation around the
Z axis, that is to specify that my new Oy axis makes "alfa" degrees with
the North direction.
You posted once the info in a GeoTIFF, containing a 4x4 matrix:
W(0) W(1) 0 W(4)
W(2) W(3) 0 W(5)
0 0 0 0
0 0 0 1
which leads me to the idea that you multiply something like:
[Xgeo Ygeo Zgeo ?]' = (4x4) * [Xr Yr Zr ?]'
where [A]' is the transpose of A.
Is this correct?
I also found a post suggesting to use Proj
(http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0201/msg00146.html
). Is this the way to do it?
If yes, is LCC the only projection that can be used?
> Note that MapServer does not support producing rotated map results. They
> are always north up.
Does this mean that if I am able to define a deviation from North,
the map will come out rotated? ("always North up")
Sorry if some questions are trivial, but I do not have a background in
geographical coordinate systems. If you know some documents that might
explain these rotation coefficients, please give me a link. Thanks.
Best regards,
marian
More information about the MapServer-users
mailing list