On Wednesday 25 November 2009 08:11:49 Stefan Krüger wrote:
> Hi
> 
> I am using 2.6.x branch from svn. Yesterday i used a different dataset with
>  my application and now i get a strange NPEs while asking isEmpty() on an
>  empty FeatureCollection coming from a Layer that has a Filter set:
> 
> java.lang.NullPointerException
>         at
> com.vividsolutions.jts.geom.Envelope.intersection(Envelope.java:505)
>         at
> org.geotools.filter.visitor.ExtractBoundsFilterVisitor.visit(ExtractBoundsF
> ilterVisitor.java:189) at
>  org.geotools.filter.AndImpl.accept(AndImpl.java:63)
>         at
> org.geotools.data.shapefile.indexed.IndexedShapefileDataStore.getAttributes
> Reader(IndexedShapefileDataStore.java:420) at
> org.geotools.data.shapefile.indexed.IndexedShapefileDataStore.getFeatureRea
> der(IndexedShapefileDataStore.java:325) at
> org.geotools.data.AbstractDataStore.getFeatureReader(AbstractDataStore.java
> :385) at
> org.geotools.data.DefaultFeatureResults.reader(DefaultFeatureResults.java:2
> 10) at
> org.geotools.data.store.DataFeatureCollection.isEmpty(DataFeatureCollection
> .java:303)
> 
> NOT (ATTNAME = '')
> 
> After removing the filter i get no Exception.
> 
> Any ideas?

It was my fault: 

The full filter was something like:
 (the_geom intersects (Coordinate(123,345,NaN) ) and (ATTRIB <> '')
and that is invalid because operators require geometries, so now i use 
 (the_geom intersects (Point(123,345) ) and (ATTRIB <> '')
and it works.

Greetz,
Steve

-- 
wiki² - Softwareentwicklung
Stefan Krüger
Straßburger Weg 26
53113 Bonn

email   [email protected]
mobile  0151 50543949   
webpage wikisquare.de
skype   alfonx

reclaim your net - http://tor.eff.org
enforce privacy - http://www.pgpi.org
pgp key id: 51B576FD - http://pgp.mit.edu

Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to