and the javadocs all seem to blame me for the mess!

So I'm clearly caffeine deprived and completely missing something.

I'm trying to use a FilterVisitor to  mangle some propertynames in filters
- all is going well until I come to the BBOX filter where I have some code
like:

        expressions[0] = filter.getExpression1();
        expressions[1] = filter.getExpression2();
        for (int i = 0; i < expressions.length; i++) {
            if (expressions[i] instanceof PropertyName) {

                PropertyName p = (PropertyName) expressions[i];
                LOGGER.debug("got a propertyName " + p.getPropertyName());
                // if a SLOT value then add extra join
                String slotAlias = setAlias("SLOTS");
                String slotDataAlias = setAlias("SLOTDATA");

            } else if (expressions[i] instanceof Literal) {
                System.out.println("got a literal
"+expressions[i].getClass()+" "+expressions[i]);
                if(expressions[i] instanceof BBoxExpression) {

                }

     ......

          return fac.bbox((PropertyName) results[0], bbox  );
}


However the filter (a BinarySpatialOperator) gives me a BBoxExpression
(which apparently I wrote at least 10 years ago) which is deprecated in
favour of Literal and has no knowledge of the CRS - and I'm stuck as to how
I can work out the CRS of the incoming BBOX to rebuild the filter.

I really wanted to just call fac.bbox(Expression e1, Expression e2) but it
doesn't exist - is this really missing functionality or do I just need to
cast more things to other things?

Cheers
Ian

PS should we think about removing some of the deprecated code (may be
something to do at the FOSS4g code sprint)?
-- 
Ian Turton
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to