[Moved from the user list] This is where the arcsde module suffers from not being one of the jdbc modules, where this problem is solved be keeping two feature types: the one used for handling the query and the one to be returned. Have a look in gt-jdbc JDBCFeatureSource.buildQueryAndReturnFeatureTypes, where these types are constructed. Also, for SQL sources, queries are split into the pre and post filters, pre being converted to SQL, and post the parts that cannot be and are to be filtered in Java. Because filtering might need more properties than are required to be returned, a feature type is created to include these extra properties. I do not know if arcsde does filter splitting.
Kind regards, Ben. On 21/05/13 12:03, Phil Scadden wrote: > If you extract from arcSDE with a spatial filter, (BBOX,POLYGON) then it > is filtered twice. The query to arcSDE has the spatial constraint so the > correct no. of records is returned. However, in > "FilteringFeatureReader.hasNext() we have: while > (featureReader.hasNext()) { peek = featureReader.next(); if > (filter.evaluate(peek)) { next = peek; return true; } } The filter is > evaluated by filter.evaluate. In most cases, the all will pass. However, > consider requesting only non-spatial attributes from the query. Ie SHAPE > is not part of feature. The sde query still returns the correct no. of > records, but filter.evaluate fails because it cant find the SHAPE > property in the feature. So how to fix? Ideally, when arcSDE can do the > spatial operation, then filter shouldnt be needed. However, the same > problem would then arise when the spatial operator is one that JTS can > handle but arcSDE cant. If SHAPE is forced into the property list for > filtering, can it be removed in the returned features. (The use case is > with WFS when wanting a single attribute about overlapped polygons, but > definitely not wanting the very complex polygon geometry coming down the > wire). > > > Notice: This email and any attachments are confidential. > If received in error please destroy and immediately notify us. > Do not copy or disclose the contents. > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may > _______________________________________________ > GeoTools-Devel mailing list > GeoTools-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-devel > > -- Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au> Software Engineer CSIRO Earth Science and Resource Engineering Australian Resources Research Centre ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel