StreamingRenderer does not handle rotated views
-----------------------------------------------
Key: GEOT-2534
URL: http://jira.codehaus.org/browse/GEOT-2534
Project: GeoTools
Issue Type: Bug
Components: core render
Affects Versions: 2.5.5
Environment: Windows XP, Java 1.6.0_13
Reporter: Per S Hustad
Assignee: Andrea Aime
Attachments: ZoomPaneMapViewer.java
The {{StreamingRenderer}} does handle rotated view as the attached program
demonstrates. This has been known for several years, see e.g.
[How to apply a
rotation|http://n2.nabble.com/How-to-apply-a-rotation-td1943417.html#a20886163],
but I did not find any existing Jira issues for it.
When rotating the map using the ZoomPane pop-up or {{CTRL-LEFT/CTRL-RIGHT}} one
can observe that the shapefile features disappear/reappear as the map is
rotated.
We have identified several reasons why this happens.
# When the {{StreamingRenderer.paint(Graphics2D, Rectangle,AffineTransform)}}
is called, the renderer creates a default Map Envelope. The calculation does
not take the Affine rotation into account, resulting in a too small envelope
for rotated views. Hence, the feature collection returned from the underlying
data store might miss out some features. It is possible to create a workaround
for this by passing in a larger Map Envelope to the StreamingRenderer and using
e.g. {{StreamingRenderer.paint(Graphics2D,
Rectangle,ReferencedEnvelopeAffineTransform)}}
# The scale denominator calculated when rotating a map varies because the
rotation is not taken into account. This results in generalization layers
beeing turned on/off as the map is rotated. We haven't found any workaround for
this.
# The {{GridCoverageRenderer}} created inside the {{StreamingRenderer}} does
not use the Affine Transform at all. Hence grid coverages are not rotated with
the rest of the map. No workaround has been found for this.
We are working on a patch for the problems above and I will submit it as soon
as it (hopefully) works
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel