I have the following code:
public SimpleFeatureCollection getFeaturesInBoundingBox(ReferencedEnvelope
bbox) throws IOException {
// Read once
if (featureCollection == null) {
featureCollection = new
ReprojectingFeatureCollection(getFeatureSource().getFeatures(),
Configuration.getInstance().getDefaultCRS());
}
if (bbox != null) {
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
String geometryPropertyName =
getFeatureSource().getSchema().getGeometryDescriptor().getLocalName();
Filter filter = ff.bbox(ff.property(geometryPropertyName), bbox);
return featureCollection.subCollection(filter);
} else {
return featureCollection;
}
}
In my case the original feature source is NZMG and the default CRS is NZTM, so
there is a reprojection involved.
When I execute the filter for a ReferencedEnvelope in NZTM, I get the following
warning:
Feb 02, 2016 5:45:05 PM
org.geotools.referencing.operation.projection.TransverseMercator.Inverse
transform
WARNING: Possible use of "Transverse_Mercator (Inverse transform)" projection
outside its valid area.
Latitude 9°57.1'S is out of range (±90°).
Which seems to indicate that something is not right somewhere. What am I doing
wrong?
Thanx
Gaby
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users