On Mon, Jul 30, 2012 at 11:11 AM, Niels Charlier <ni...@scitus.be> wrote:
>
> http://docs.codehaus.org/display/GEOTOOLS/Support+for+three-dimensional+envelopes+and+bounding+box+filters
>
> Okay, so I decided to remove the Envelope3D class, and merge it with
> ReferencedEvelope3D, and make ReferencedEvelope3D derived from
> ReferencedEnvelope.
> I hope this addresses the previously expressed concerns adequately.
>
Ah, forgot one more thing that affects the proposal.
The proposal is effectively adding a new type of filter, normally that
would require a change
in the filter visitor API to handle such new filter explicitly, however
this case is peculiar
in that the new filter extends an existing one.
This means the API might not be in need of change, but it has consequences
on the API.
In particular, all filter visitors dedicated to the manipulation of filters
(including the
simplifiying filter visitor) will create a copy that's a plain 2D BBOX, and
the CQL encoder
will encode the bbox as a 2D one.
I see there is in the code:
+ public Object accept(FilterVisitor visitor, Object context) {
+ Object result = visitor.visit(this, context);
+
+ //hack - if the visitor tried to clone us but created a regular
bbox instead with replace it with a proper clone
+ if (result instanceof BBOX) {
+ BBOX clone = (BBOX) result;
+ if(clone.getExpression1().equals(getExpression1()) &&
clone.getExpression2().equals(getExpression2()))
+ return new BBOX3DImpl(property, envelope, factory);
+
+ }
+
+ return result;
+ }
I'm sure this works with most/all of the existing code, but is this the
right way to go?
Given that most filters manipulating filters are extending from the
duplicating filter visitor,
wouldn't it be better to fix that one instead?
Also, I believe the ReprojectingFilterVisitor won't work properly with the
above hack,
and that it might need some logic changes (a way consistent with geometry
reprojection
would be to reproject the 2d component of the bbox and leave the 3d part
move
unaltered to the result)
Also, given this is an API change there should be some documentation on a
"upgrade to 9.x" page telling people to expect this new kind of filter in
their custom
visitors, and probably some changes on the FilterVisitor javadocs are in
order as well.
This is one problematic area of the proposal, it would have been better to
point
it out in the proposal document instead of having people have to review the
code
in order to see it: a good proposal is also showing what is _not_
covered/done and
what the potentially problematic areas are (and how the problems have been
addressed).
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel