Package org.geotools.gce.imagemosaic.egr
Class RendererUtilities
- Object
-
- RendererUtilities
-
public final class RendererUtilities extends Object
This is a reduced copy of RenderUtilities found in the render module, to avoid adding a dependency on it while using only a few methods
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Envelope
createMapEnvelope(Rectangle paintArea, AffineTransform worldToScreen)
Creates the map's bounding box in real world coordinates.static AffineTransform
worldToScreenTransform(ReferencedEnvelope mapExtent, Rectangle paintArea)
Sets up the affine transform
-
-
-
Method Detail
-
worldToScreenTransform
public static AffineTransform worldToScreenTransform(ReferencedEnvelope mapExtent, Rectangle paintArea)
Sets up the affine transformNOTE It is worth to note that here we do not take into account the half a pixel translation stated by ogc for coverages bounds. One reason is that WMS 1.1.1 does not follow it!!!
- Parameters:
mapExtent
- the map extentpaintArea
- the size of the rendering output area- Returns:
- a transform that maps from real world coordinates to the screen
-
createMapEnvelope
public static Envelope createMapEnvelope(Rectangle paintArea, AffineTransform worldToScreen) throws NoninvertibleTransformException
Creates the map's bounding box in real world coordinates.- Parameters:
worldToScreen
- a transform which converts World coordinates to screen pixel coordinates. No assumptions are done on axis order as this is assumed to be pre-calculated. The affine transform may specify an rotation, in case the envelope will encompass the complete (rotated) world polygon.paintArea
- the size of the rendering output area- Returns:
- the envelope in world coordinates corresponding to the screen rectangle.
- Throws:
NoninvertibleTransformException
-
-