[ 
http://jira.codehaus.org/browse/GEOT-2534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Per S Hustad reopened GEOT-2534:
--------------------------------


This is really a bit embarrassing but I've detected a bug in the patch provided 
for GEOT-2534.  In RendererUtilities.createMapEnvelope(Rectangle, 
AffineTransform)   it is really not a good idea to initialize maximum  values 
with Double.MIN_VALUE as this is a positive value very close to zero.

The current version only works for Coordinate Systems with only positive values 
along the axes. For e.g. Google Maps longitude, latitude it would fail 
miserably.

NOTE: I've found another (unrelated) suspect usage of Double.MIN_VALUE in the 
supported  2.5.x code base.  Look for Double.MIN_VALUE and Float.MIN_VALUE in  
org.geotools.arcsde.gce.RasterCellType,  There are also several suspicious 
occurrences in the unsupported modules.

I attach a new patch and test-case to be applied on top of the 
gt-2534-patch1.txt  in  the 2.5.x branch and possibly in the  trunk as well. 
Sorry for any inconvenience.




> 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
>             Fix For: 2.5.8
>
>         Attachments: gt-2534-patch1.txt, 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

        

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to