On Thursday 24 September 2009 09:12:03 am Michael Bedward wrote:
> Hello,
>
> I've been trying to use CQL to make a DWITHIN filter like this...
>
> DirectPosition2D pos = ...
> double distance = ...
> Unit<?> unit =
> featureType.getCoordinateReferenceSystem().getCoordinateSystem().getAxis(0)
>.getUnit(); String unitName = unit.toString();
>
> String filterString = String.format("DWITHIN( "the_geom", POINT(%f
> %f), %s, %s)", pos.x, pos.y, distance, unitName);
> Filter filter = CQL.toFilter(filterString);
>
> But I run into trouble when CQL tries to parse the filter string and
> doesn't recognize common unit names such as "m" for metre / meter.
CQL implements OGC Catalogue Services Specification. The BNF for units is
<distance units> ::= = "feet" | "meters" | "statute miles" | "nautical miles"
| "kilometers"
But, in that specification you can read the following comment:
"this set of units is just an example. The real list of distance unit
must be developed"
>
> Am I missing something ?
Probably the real list of units is defined now. I am going to review the OGC
specifications in order to update the unit list. I will add the issue as CQL
improvement.
>
> cheers
> Michael
Well, right now you should use "meters".
cheers
>
> ---------------------------------------------------------------------------
>--- Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
--
Mauricio Pazos
www.axios.es
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users