Hello,
I'm reading out Features from a WFS (using Windows 7 x64, Java 7, GeoTools 12-RC1 [gt-wfs, gt-epsg-hsql and other modules]).
The FeatureCollection I create doesn't have a CRS. Why is that?
And what do the last four warnings mean? Can I do anything to prevent them?
When I use the new gt-wfs-ng module or use the older GeoTools 11.1 the warnings stay the same.
Here is my code:
String getCapabilities = "http:;
Map<String, String> connectionParameters = new HashMap<>();
connectionParameters.put("WFSDataStoreFactory:GET_CAPABILITIES_URL", getCapabilities );
DataStore dataStore = DataStoreFinder.getDataStore(connectionParameters);
WFSDataStore wfsDataStore = (WFSDataStore) dataStore;
String featureTypeName = "medford:hydro";
Query query = new Query();
query.setCoordinateSystem(wfsDataStore.getFeatureSource(featureTypeName).getInfo().getCRS());
query.setMaxFeatures(5);
SimpleFeatureCollection simpleFeatureCollection = wfsDataStore.getFeatureSource(featureTypeName).getFeatures(query);
int i = 0;
try (SimpleFeatureIterator iterator = simpleFeatureCollection.features()){
while(iterator.hasNext() ){
SimpleFeature feature = iterator.next();
System.out.println("Feature " + i + ": " + feature);
i++;
}
}
I get following Warnings in the console:
Unable to find source-code formatter for language: log. Available languages are: actionscript, html, java, _javascript_, none, sql, xhtml, xml
2014-08-29T15:31:31.298+0200 WARNING Creating location with null CoordinateReferenceSystem - did you mean to setCRS?
2014-08-29T15:31:31.308+0200 WARNING Creating the_geom with null CoordinateReferenceSystem - did you mean to setCRS?
2014-08-29T15:31:31.587+0200 WARNING results[ class java.lang.String ] is not of type class net.opengis.wfs.ResultTypeType
2014-08-29T15:31:31.597+0200 WARNING Binding: {http:2014-08-29T15:31:31.607+0200 WARNING Binding: {http:2014-08-29T15:31:31.607+0200 WARNING Binding: {http:
Would be realy thankfull, if anybody could answer my questions.
With kind regards
Jonas