Hello folks

Humbly stepping in: I believe that if there is support for multiple 
geometries (and thankfully there is!), then all such geometries should 
be considered for every operation when the user has not specified anything.

In fact, I have noticed that this is indeed the behavior implemented in 
SimpleFeatureImpl.getBounds(): it checks all geometries to compute the 
feature's bounds.

On the other hand, this is NOT the way things are implemented in 
MemoryDataStore.getBounds(): it could have just asked for each Feature's 
bounds, but for some reason it computes the bounds explicitly using only 
the default geometry. In my current view of things, this would be 
considered a bug..

Other than that, I don't really know how things behave for other 
DataStores - if my current view is correct, I hope that they all 
consider all of the geometry attributes :). Taking a quick look at 
JDBCDataStore, it seems to be the case.

Cheers
Milton

Andrea Aime wrote:
> [email protected] ha scritto:
>> Hi list,
>>  
>> Can you have more than 1 geometry attribute in a feature?
> 
> Yes, the current SimpleFeature supports N, either 0, 1 or many.
> 
>> I'm just wondering, because I'm trying to fix bounding box query for 
>> complex features.
>> It works with my fix, but only if you don't specify the geometry 
>> attribute name (so it will use the default geometry, ie. the first (and 
>> only?) geometry attribute).
>> eg. 
>> wfs?request=GetFeature&typeName=gsml:MappedFeature&bbox=132,-27,133,-26 
>> <http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=gsml:BoreholeDetails&bbox=132,-27,133,-26>
>>  works
>>  
>> But if I specify the geometry attribute name in the filter, it doesn't 
>> work.
>> eg. 
>> wfs?request=GetFeature&typeName=gsml:MappedFeature&propertyName=gsml:shape&bbox=132,-27,133,-26
>>  
>> <http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=gsml:BoreholeDetails&bbox=132,-27,133,-26>
>>  
>> I know where to fix it, I'm just not sure if I should (ie. if this 
>> scenario should be supported, or ever needed).
> 
> Hmmm... I think the answer should contain the full bbox including all
> geometries in the returned attributes, not just the default one.
> But then again, not sure we ever specified that anywhere in the API
> Curious to hear what others think about the subject
> 
> Cheers
> Andrea
> 

-- 

Milton Jonathan
Grupo GIS e Meio Ambiente
Tecgraf/PUC-Rio
Tel: +55-21-3527-2502

------------------------------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to