sorry, I'm not using lists very often, so I didin't notice mailing it to only you when replying.
Thanks for your advices. I am still relatively new to GT and Spatial data in general, and both is a big stuff and needs a lot of debugging inside the GT itself, so I'll join the development effort as soon as I feel strong enough.
On 2013.08.25, at 18:59, Andrea Aime wrote:
> Hi Mantas,
> Please keep the discussion on the mailing list. Comments below
> On Sun, Aug 25, 2013 at 2:49 PM, Mantas Indrasius <mantas@...> wrote:
> That might be the case, but as a concept of joining is already in GT, CQL should follow IMHO.
> I don't see this as automatic, joining was added to GeoTools years later than CQL/ECQL.
> The plain CQL parser should not be modified, CQL is a standard language, but the ECQL one
> could be adapted to add a syntax for join aliases.
> By the way, JavaDoc for Query contains a sample code which is wrong (http://docs.geotools.org/latest/javadocs/org/geotools/data/Query.html):
> Query query = new Query("countries");
> Join join = new Join("cities", CQL.toFilter("CONTAINS(geometry, b.geometry)"));
> join.setFilter(CQL.toFilter("CITY_NAME = 'Canmore'"))
> First of all, CQL can't compile it and ECQL should be used instead. And the same issue of alias replacing b.geometry to b/geometry.
> Not sure who wrote the documentation, Jody, do you know?
> I found a workaround by placing the b.SAV_ID into quotes as SAV_ID = "g.SAV_ID" which takes the attribute name literally, but I don't find it a nice way to do.
> The GeoTools community has open rules for contributing changes, please hop on the devel list, discuss the
> changes you'd like to implement in the ECQL parser and once there is consensus on how it should be done,
> make a pull request to contribute the improvement
> Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.
> Ing. Andrea Aime
> Technical Lead
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39 339 8844549