15 |
import org.apache.log4j.Logger; |
import org.apache.log4j.Logger; |
16 |
import org.geotools.data.FeatureSource; |
import org.geotools.data.FeatureSource; |
17 |
import org.geotools.feature.AttributeType; |
import org.geotools.feature.AttributeType; |
18 |
|
import org.geotools.feature.FeatureCollection; |
19 |
import org.geotools.styling.Style; |
import org.geotools.styling.Style; |
20 |
import org.opengis.referencing.crs.CoordinateReferenceSystem; |
import org.opengis.referencing.crs.CoordinateReferenceSystem; |
21 |
|
|
22 |
|
import schmitzm.geotools.feature.FeatureOperationTreeFilter; |
23 |
import schmitzm.geotools.styling.StylingUtil; |
import schmitzm.geotools.styling.StylingUtil; |
24 |
import skrueger.AttributeMetaData; |
import skrueger.AttributeMetaData; |
25 |
import skrueger.i8n.Translation; |
import skrueger.i8n.Translation; |
229 |
this.sldFile = sldFile; |
this.sldFile = sldFile; |
230 |
} |
} |
231 |
|
|
232 |
|
/** |
233 |
|
* Returns the features of the {@link FeatureSource}. |
234 |
|
* |
235 |
|
* @see {@link StyledFeatureInterface} |
236 |
|
*/ |
237 |
|
@Override |
238 |
|
public FeatureCollection getFeatureCollection() { |
239 |
|
FeatureCollection features; |
240 |
|
try { |
241 |
|
features = getGeoObject().getFeatures(); |
242 |
|
} catch (IOException e) { |
243 |
|
throw new RuntimeException( |
244 |
|
"Error getting the features of the FeatureSource"); |
245 |
|
} |
246 |
|
return features; |
247 |
|
} |
248 |
|
|
249 |
|
/** |
250 |
|
* Same as {@link #getGeoObject()} method, but complies to the |
251 |
|
* {@link StyledFeatureInterface} |
252 |
|
* |
253 |
|
* @see {@link StyledFeatureInterface} |
254 |
|
*/ |
255 |
|
@Override |
256 |
|
public FeatureSource getFeatureSource() { |
257 |
|
return getGeoObject(); |
258 |
|
} |
259 |
|
|
260 |
} |
} |