[Mapserver-dev] Rotated Map Rendering
Frank Warmerdam
warmerdam at pobox.com
Fri May 21 15:51:54 EDT 2004
Julien-Samuel Lacroix wrote:
> Frank, a question or two about this. I know I'm late, but I'll trow my
> idea in anyway, feel free to ignore them. Is there any advantage of
> using the x/y min/max + rotation datastructure? What was the main reason
> of going this way?
>
> Because my thought was since an extent defined this way with angle 0
> will be the same thing as a regular extent, we could maybe support both
> extent definition and put, like it have been suggested many time, the
> rotation angle in a separate keyword.
Julien,
I think what you are suggesting is what has actually been done. As things
stand in my local 4.3 tree the we have definitions like:
typedef struct {
int need_geotransform;
double rotation_angle;
double geotransform[6]; // Pixel/line to georef.
double invgeotransform[6]; // georef to pixel/line
} geotransformObj;
typedef struct {
...
int height, width;
rectObj extent; /* map extent array */
double cellsize; /* in map units */
geotransformObj gt; /* rotation / geotransform */
...
} mapObj;
So, the geotransformObj now carries the rotation but the extent
information is just in the normal extent rectObj.
In the mapfile I am just using the ANGLE keyword to set the
gt.rotation_angle.
eg.
SIZE 300 400
EXTENT 360015 4359225 371025 4373355
ANGLE 30
> I don't know how much effort it
> will be hard integrate, but this could keep your original plan on the
> track and lead to future enhancement that will take advantage of this
> definition (like camera model features).
I'm not sure how this helps to address camera models or other advanced
features.
> Ishh! Round map!
> Just kidding!
Yikes! Frightening thought ... well perhaps with some sort of masking.
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-dev
mailing list