Hi Justin:

Yeah I understand the conflict. The definition of "" kind of stands
for "draw this feature"; and it is never quite clear what is
expected...

The other way to interpret this is as a request to draw *all* the
geometry associated with the feature - but we made use of default
geometry as an optimization for speed. The commented out code really
highlights that default geometry is being used as a workaround.

The only issue I see with the work around is that the styles may of
been set up for a default geometry; and thus they may get confused
when another geometry type is found. That is a Rule may of been
selected already based on the geometry type polygon; and this code may
ask that rule to render a point.

So the alternative to "any" is "all" - what would be the consequence
of rendering all geometry?

Jody

On Fri, Jun 12, 2009 at 2:58 AM, Justin Deoliveira<jdeol...@opengeo.org> wrote:
> Some changes to the implementation of SimpleFeature.getDefaultGeometry()
> are causing some problems with geoserver cite tests. The changes in
> question are described here:
>
> http://jira.codehaus.org/browse/GEOT-2403
>
> As stated in the issue, the method before the changes was inconsistent
> with the contract of getDefaultGeometry(), and henceforth the following
> fallback was removed:
>
> +//        // not found? Ok, let's do a lookup then...
> +//        if ( defaultGeometry == null ) {
> +//            for ( Object o : values ) {
> +//                if ( o instanceof Geometry ) {
> +//                    defaultGeometry = o;
> +//                    break;
> +//                }
> +//            }
> +//        }
>
> In which an exhaustive lookup for any geometry is done. Perhaps not the
> best place for the code, and perhaps bad practice to depend on such a
> fallback/hack/assumption, but nonetheless, it was relied on, and hence
> needs to be replicated with an alternative to rectify the regression.
>
> The case in which this is coming up is in a wfs bounding box query which
> does not specify a specific geometric attribute. So what is done is that
> the empty string "" is placed into a PropertyName. This runs through the
> PropertyAccessor extension point and gets mapped to
> SimpleFaturePropertyAccessorFactory.DEFAULT_GEOMETRY_ACCESS, which just
> calls through to feature.getDefaultGeometry().
>
> So.. I am proposing that the definition of "" as a property name be
> explicitly mapped to *any* geometry, since that is how it is being used
> in this context, rather than the default goemetry, now that its
> definition and implementation have been synced up.
>
> Discussing the change with Gabriel he has suggested we change the name
> DEFAULT_GEOMETRY_ACCESS to ANY_GEOMETRY_ACCESS, which makes sense to me.
>
> Thoughts and/or opinions? The only other place place I can see this
> causing an issue might with SLD.
>
> -Justin
>
> --
> Justin Deoliveira
> OpenGeo - http://opengeo.org
> Enterprise support for open source geospatial.
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Geotools-devel mailing list
> Geotools-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to