LepiMarbois a écrit :
> AffineTransform world2screen = RendererUtilities.worldToScreenTransform(
> worldwg84, m_mapPane.getBounds(),Projections.getCRS(Projections.WGS84));


I don't know if RendererUtilities.worldToScreenTransform(...) is reliable. The 
mouse coordinates is relative to the coordinate system as defined by 
Graphics2D.getTransform(), and Swing put a translation in this transform. The 
translation depends on the size of windows border. It may be taken in account 
in 
the (x,y) value of the Rectangle given by getBounds(), but I'm not sure if it 
is 
the same translation. A safer approach is to work with the AffineTransform used 
with Graphics2D, but I don't know if the streaming renderer keep this kind of 
information.

We are in the process of rewriting the renderer from scratch, and this renderer 
should provides much better support of CRS and this kind of transforms. But it 
may take a few months before we get something.

        Martin

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to