Can you please try with GeoTools 12-RC1 - we wrote a new WFS client that
needs testing, and since it is a replacement any trouble you are having
with the old client won't be fixed.
--
Jody

Jody Garnett


On Fri, Aug 29, 2014 at 6:50 AM, <list-...@web.de> wrote:

> 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://suite.opengeo.org/geoserver/wfs?service=wfs&version=1.1.0&request=GetCapabilities
> ";
> 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:
> _____________________________________________________
> 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://www.opengis.net/ows}ServiceType does not declare a target type
> 2014-08-29T15:31:31.607+0200  WARNING  Binding: {
> http://www.opengis.net/wfs}Base_TypeNameListType does not declare a
> target type
> 2014-08-29T15:31:31.607+0200  WARNING  Binding: {
> http://www.opengis.net/wfs}TypeNameListType does not declare a target type
> _____________________________________________________
>
>
>
> Would be realy thankfull, if anybody could answer my questions.
>
> With kind regards
> Jonas
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to