[Mapserver-dev] Rotated Map Rendering

Frank Warmerdam warmerdam at pobox.com
Wed May 19 15:26:59 EDT 2004


Steve Lime wrote:
> You're right, I was thinking EXTENT and ROTATEDEXTENT. With your
> explanation its
> clear that just ROTATION makes no sense.
> 
> Clearer now. Why the switch from min/max to the alternative method? I
> think that will 
> only lead to confusion. You could just use the normal extent and throw
> rotation in using
> a single parameter, e.g.
> 
> EXTENT ... as normal ...
> ROTATION 45
> 
> Or even use ANGLE, then we don't have to add any keywords. Even if we
> go with
> ROTATEDEXTENT I'd prefer expressing the extent portion as minx, miny,
> maxx,
> maxy for consistancy.

Steve,

What would the meaning of the extent be in the rotated case? I can imagine
a few alternatives:

  1) The map view would computed as if it was the provided extent, but then
     rotated around the center point by the desired amount.  Thus the user
     provided extent would no be completely contained within the view, nor would
     it it be completely containing the view but it would be the same ground
     size as the final view.

  2) The map view would be computed to completely display the extent provided
     by the user plus as much additional data outside that extent as necessary
     given the rotation angle.  This is sort of similar to the current approach
     where the extent may be adjusted larger if needed to maintain a square
     pixel size ... the extent is essentially request that the user should see
     *at least* the area requested.  The rotated view would be rotated about the
     center of the requested extent.

  3) The map view would be computed to fall completely within the requested
     extent, so somewhat less than the requested extent would be actually visible.
     The extent is essentially treated as an MBR for what may be shown.

I was specifically trying to avoid a min/max style extent because it is so
unclear what case is being used and because for many applications a "preprocessing
step" of faking up the extents is going to be required.   However, from my
clients point of view any of these can be "worked around" so I am willing to
consider other view points.

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