14 |
import skrueger.i8n.Translation; |
import skrueger.i8n.Translation; |
15 |
|
|
16 |
/** |
/** |
17 |
* This class provides a simple implementation of {@link StyledMapInterface} |
* This class provides a simple implementation of {@link StyledLayerInterface} |
18 |
* for {@link AbstractGridCoverage2DReader}. The uncache functionality is not supported, |
* for {@link AbstractGridCoverage2DReader}. The uncache functionality is not supported, |
19 |
* because if the coverage is read once this class bases on an existing {@link GridCoverage2D} |
* because if the coverage is read once this class bases on an existing {@link GridCoverage2D} |
20 |
* object in memory. |
* object in memory. |
21 |
* @author <a href="mailto:[email protected]">Martin Schmitz</a> (University of Bonn/Germany) |
* @author <a href="mailto:[email protected]">Martin Schmitz</a> (University of Bonn/Germany) |
22 |
* @version 1.0 |
* @version 1.0 |
23 |
*/ |
*/ |
24 |
public class StyledGridCoverageReader extends AbstractStyledMap<AbstractGridCoverage2DReader> implements StyledGridCoverageReaderInterface { |
public class StyledGridCoverageReader extends AbstractStyledLayer<AbstractGridCoverage2DReader> implements StyledGridCoverageReaderInterface { |
25 |
|
|
26 |
/** Holds the meta data for displaying a legend. */ |
/** Holds the meta data for displaying a legend. */ |
27 |
protected RasterLegendData legendData = null; |
protected RasterLegendData legendData = null; |
54 |
* @param icon an icon for the object (can be {@code null}) |
* @param icon an icon for the object (can be {@code null}) |
55 |
* @exception IllegalArgumentException if {@code null} is given as ID or geo object |
* @exception IllegalArgumentException if {@code null} is given as ID or geo object |
56 |
*/ |
*/ |
57 |
public StyledGridCoverageReader(AbstractGridCoverage2DReader gcr, String id, Translation title, Translation desc, Translation keywords, StyledMapStyle<RasterLegendData> style, ImageIcon icon) { |
public StyledGridCoverageReader(AbstractGridCoverage2DReader gcr, String id, Translation title, Translation desc, Translation keywords, StyledLayerStyle<RasterLegendData> style, ImageIcon icon) { |
58 |
super(gcr, JTSUtil.createEnvelope(gcr.getOriginalEnvelope()), gcr.getCrs(), id, title, desc, keywords, style != null ? style.getGeoObjectStyle() : null, icon); |
super(gcr, JTSUtil.createEnvelope(gcr.getOriginalEnvelope()), gcr.getCrs(), id, title, desc, keywords, style != null ? style.getGeoObjectStyle() : null, icon); |
59 |
setLegendMetaData( style != null ? style.getMetaData() : null ); |
setLegendMetaData( style != null ? style.getMetaData() : null ); |
60 |
} |
} |
103 |
* @param icon an icon for the object (can be {@code null}) |
* @param icon an icon for the object (can be {@code null}) |
104 |
* @exception IllegalArgumentException if {@code null} is given as ID or geo object |
* @exception IllegalArgumentException if {@code null} is given as ID or geo object |
105 |
*/ |
*/ |
106 |
public StyledGridCoverageReader(AbstractGridCoverage2DReader gcr, String id, String title, String desc, String keywords, StyledMapStyle<RasterLegendData> style, ImageIcon icon) { |
public StyledGridCoverageReader(AbstractGridCoverage2DReader gcr, String id, String title, String desc, String keywords, StyledLayerStyle<RasterLegendData> style, ImageIcon icon) { |
107 |
this(gcr, |
this(gcr, |
108 |
id, |
id, |
109 |
title, |
title, |
137 |
* @param style a display style with legend information |
* @param style a display style with legend information |
138 |
* @exception IllegalArgumentException if {@code null} is given as ID or geo object |
* @exception IllegalArgumentException if {@code null} is given as ID or geo object |
139 |
*/ |
*/ |
140 |
public StyledGridCoverageReader(AbstractGridCoverage2DReader gcr, String id, String title, StyledMapStyle<RasterLegendData> style) { |
public StyledGridCoverageReader(AbstractGridCoverage2DReader gcr, String id, String title, StyledLayerStyle<RasterLegendData> style) { |
141 |
this(gcr, |
this(gcr, |
142 |
id, |
id, |
143 |
title, |
title, |
194 |
} |
} |
195 |
|
|
196 |
/** |
/** |
197 |
* Does nothing, because the {@link AbstractStyledMap} bases on existing |
* Does nothing, because the {@link AbstractStyledLayer} bases on existing |
198 |
* objects (in memory) which can not be uncached and reloaded. |
* objects (in memory) which can not be uncached and reloaded. |
199 |
*/ |
*/ |
200 |
public void uncache() { |
public void uncache() { |
203 |
|
|
204 |
/* |
/* |
205 |
* (non-Javadoc) |
* (non-Javadoc) |
206 |
* @see skrueger.geotools.StyledMapInterface#getInfoURL() |
* @see skrueger.geotools.StyledLayerInterface#getInfoURL() |
207 |
*/ |
*/ |
208 |
public URL getInfoURL() { |
public URL getInfoURL() { |
209 |
return null; |
return null; |