Hi all,

Firstly, I just want to say that I really like GeoTools/GeoServer.  The 
extensibility is fantastic, and it's pretty fun to develop against.


I'm working on a geotools datastore implementation for a project.  I've heeded 
the GT recommendation of using ContentDataStore, since AbstractDataStore has 
been deprecated.  I'm running into an issue though.  I'm injecting query hints 
in a GSProcess via invertQuery(...) in order to communicate to my datastore 
that I want to do a rendering transformation, and I'm trying to offload the 
heavy lifting for this transform to an external system.  I've seen a similar 
technique used in other projects.

I've found that invertQuery is getting a Query.ALL as the targetQuery, 
regardless of what I pass in a CQL statement/bounding box.  This comes from 
RenderedImageMapOutputFormat, which kicks off the transform with the following 
call:


Object result = helper.applyRenderingTransformation(transformation, 
layer.getFeatureSource(), 
                                layer.getQuery(), Query.ALL, readGG, 
coverageCRS, interpolationHints);
Since I can't add Hints to a Query.ALL, I'm wrapping it in a new Query for now 
as a workaround.  I'm wondering if I'm doing something wrong to get to this 
point though, since I know that Hints are being added in this method in other 
systems.  Is this expected behavior?  If so, is there a more elegant way to do 
this kind of thing?

My second issue is coming from ContentDataStore.  The SimpleFeatureCollection 
is gotten by calling ContentFeatureSource.getFeatures(query).  This method is 
final in ContentFeatureSource.  It creates a ContentFeatureCollection, which 
derives the feature type from the feature source.  From what I can tell, this 
makes it impossible to return a collection with a different feature type than 
the ContentFeatureSource normally builds by default.


Any thoughts on this?  Again, if there is a cleaner way to handle all of this, 
or if it sounds like I'm misusing the API, please let me know.If not, I'd like 
to propose that ContentFeatureSource.getFeatures(query) have the final keyword 
removed, which would allow me to return a subclass of ContentFeatureCollection 
that derives its feature type from the Query dependent FeatureReader as opposed 
to the type dependent ContentFeatureSource.  


Thanks for your time!

------------------------------------------------------------------------------
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to