Package org.mapfish.print.map.geotools
Class GeotiffLayer
java.lang.Object
org.mapfish.print.map.geotools.AbstractGeotoolsLayer
org.mapfish.print.map.geotools.GeotiffLayer
- All Implemented Interfaces:
MapLayer
Reads a GeoTIFF file from a URL.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
The parameters for reading a Geotiff file, either from the server or from a URL.static final class
Renders a GeoTIFF image as layer.Nested classes/interfaces inherited from interface org.mapfish.print.attribute.map.MapLayer
MapLayer.LayerContext, MapLayer.RenderType
-
Field Summary
Fields inherited from interface org.mapfish.print.attribute.map.MapLayer
DEFAULT_SCALING
-
Constructor Summary
ConstructorsConstructorDescriptionGeotiffLayer
(Function<MfClientHttpRequestFactory, org.geotools.coverage.grid.io.AbstractGridCoverage2DReader> reader, StyleSupplier<org.geotools.coverage.grid.io.AbstractGridCoverage2DReader> style, ExecutorService executorService, AbstractLayerParams params) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionList<? extends org.geotools.map.Layer>
getLayers
(MfClientHttpRequestFactory httpRequestFactory, MapfishMapContext mapContext, Processor.ExecutionContext context, MapLayer.LayerContext layerContext) Get theDataStore
object that contains the data for this layer.Specify whether layer should be rendered as PNG, JPEG or SVG.prepareRender
(MapfishMapContext transformer, MfClientHttpRequestFactory clientHttpRequestFactory) Render the layer to the graphics2D object.Methods inherited from class org.mapfish.print.map.geotools.AbstractGeotoolsLayer
getFailOnError, getLayerTransformer, getName, getOpacity, prefetchResources, prepareLayerRendering, render, supportsNativeRotation, tryAddLayer
-
Constructor Details
-
GeotiffLayer
public GeotiffLayer(Function<MfClientHttpRequestFactory, org.geotools.coverage.grid.io.AbstractGridCoverage2DReader> reader, StyleSupplier<org.geotools.coverage.grid.io.AbstractGridCoverage2DReader> style, ExecutorService executorService, AbstractLayerParams params) Constructor.- Parameters:
reader
- the reader to use for reading the geotiff.style
- style to use for rendering the data.executorService
- the thread pool for doing the rendering.params
- the parameters for this layer
-
-
Method Details
-
getRenderType
Description copied from interface:MapLayer
Specify whether layer should be rendered as PNG, JPEG or SVG.- Returns:
- render type
-
prepareRender
public MapLayer.LayerContext prepareRender(MapfishMapContext transformer, MfClientHttpRequestFactory clientHttpRequestFactory) Description copied from interface:MapLayer
Render the layer to the graphics2D object.- Parameters:
transformer
- the map transformer containing the map bounds and size.clientHttpRequestFactory
- the factory to use for making http requests.- Returns:
- the LayerContext for this requested rendering.
-
getLayers
public List<? extends org.geotools.map.Layer> getLayers(MfClientHttpRequestFactory httpRequestFactory, MapfishMapContext mapContext, Processor.ExecutionContext context, MapLayer.LayerContext layerContext) Description copied from class:AbstractGeotoolsLayer
Get theDataStore
object that contains the data for this layer.- Specified by:
getLayers
in classAbstractGeotoolsLayer
- Parameters:
httpRequestFactory
- the factory for making http requestsmapContext
- the map transformercontext
- the job IDlayerContext
- the context of this layer
-