Two things Andrea - create a Jira report (or another page) and put all 
the background story and rejected ideas there. Leave the proposal to 
stand on its own so people can see the result of all your hard work.

We are also going to need Jesse's review on this one as he is deeply 
involved in hacking around the lack of Query hints.

Personally I expected the following:
- to use Hints straight up, not pass them in one at a time... your 
setHint method seems to have a side effect?

Hints hints = new Hints(
    Hints.DECIMATION_DISTANCE, new Double(1500.12),
    Hints.COORDINATE_SEQUENCE_FACTORY, 
"org.geotools.geometry.jts.PackedCoordinateSequenceFactory"
);
query.setHints( hints );

This enables the resuse of factories etc.

- Either the retuened FeatureCollection or a seperate method to check 
was was used, giving you an oppertunity to apply decorators if needed. 

FeatureCollection stuff = featureSource.getFeatures( query );
Map map = featureSource.getImplementationHints();
if( !map.containsKey( Hints.DECIMATION_DISTANCE ) ){
    stuff = new SimplifyFeatureCollectionDecorator( stuff, 1500.12 );
}


For point number two I would like to add support to AbstractDataStore 
for most of the common hints (ie apply the wrappers in the super class 
if the subclass does not cough up a simplified feature collection).

Cheers,
Jody

Andrea Aime wrote:
> Hi,
> turned out I already wrote a Query hint proposal some time ago,
> and then forgot about it. Today I beefed it up with some extra content,
> and it's ready for your commenting pleasure:
>
> http://docs.codehaus.org/display/GEOTOOLS/Add+hints+support+to+Query+object 
>
>
> I think the crux is where to put the "honored hints" getter method,
> which feels like playing at "what interface do you want to break 
> today"? :)
>
> Cheers
> Andrea


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to