On Sun, Nov 7, 2010 at 10:20 PM, Justin Deoliveira <[email protected]> wrote:
>> The thing contains first the standard gml feature properties, one
>> being "location", which
>> is a geometry. The code grabs the default geometry in order to perform
>> the buffering,
>> and that breaks because the default geometry is the first one... location.
>>
>> Justin, do you know if there is any way to get around this issue? The
>> default gml
>> properties are rarely used. At the very least I guess we should state
>> that the default
>> geometry is the first geometric attribute besides location.
>>
>
> Yeah, this issue is indeed a pain. We could pretty easily add an encoding
> flag to not output the location (and the other attributes on
> AbstractFeatureType). However I could see that leading to issues if someone
> actually has an attribute called "location" on their dataset.
> So what it happening I guess is that location is considered the default
> geometry, and it is null? SimpleFeatureImpl used to handle this case in that
> it would look up the first non null geometry when the default is null. But
> this logic now lives in SimpleFeaturePropertyAccessor.DEFAULT_GEOMETRY. So
> could the code that is doing the buffer or whatever else use an expression
> to look up the geometry instead of going directly to
> feature.getDefaultGeometry()?

Ah, I see. Yeah, it could be modified that way (or maybe better, to just buffer
every non null geometry in the feature unless a explicit).

I guess what is bothering me is that the "location" attribute seems made up,
it was never in the data nor directly in the schema. But I understand it's
inherited so it's actually part of the schema, so any actual feature could
have it

Cheers
Andrea

-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584962313
fax:     +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-----------------------------------------------------

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to