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 |
|
|
122 |
} |
} |
123 |
} |
} |
124 |
|
|
125 |
public FeatureSource getGeoObject() throws Exception { |
public FeatureSource getGeoObject() { |
126 |
return fs; |
return fs; |
127 |
} |
} |
128 |
|
|
228 |
this.sldFile = sldFile; |
this.sldFile = sldFile; |
229 |
} |
} |
230 |
|
|
231 |
|
/** |
232 |
|
* Returns the features of the {@link FeatureSource}. |
233 |
|
* |
234 |
|
* @see {@link StyledFeaturesInterface} |
235 |
|
*/ |
236 |
|
@Override |
237 |
|
public FeatureCollection getFeatureCollection() { |
238 |
|
FeatureCollection features; |
239 |
|
try { |
240 |
|
features = getGeoObject().getFeatures(); |
241 |
|
} catch (IOException e) { |
242 |
|
throw new RuntimeException( |
243 |
|
"Error getting the features of the FeatureSource"); |
244 |
|
} |
245 |
|
return features; |
246 |
|
} |
247 |
|
|
248 |
|
/** |
249 |
|
* Same as {@link #getGeoObject()} method, but complies to the |
250 |
|
* {@link StyledFeaturesInterface} |
251 |
|
* |
252 |
|
* @see {@link StyledFeaturesInterface} |
253 |
|
*/ |
254 |
|
@Override |
255 |
|
public FeatureSource getFeatureSource() { |
256 |
|
return getGeoObject(); |
257 |
|
} |
258 |
|
|
259 |
} |
} |