[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] Spatial Queries using CQL in uDig
|
Andrea Aime ha scritto:
siddharth raghuvanshi ha scritto:
Hi,
I am using udig 1.2.m3, in which "Spatial filters do not work using
CQL language" is resolved.
All the spatial queries using CQL is working fine, but when I am using
the query
DWITHIN(the_geom, POINT(78 22), 1000, meters), it is selecting almost
entire parts of the world, which is irrelevent. Also, if I give the
unit of measurement to be kilometers, the answer remains the same.
I am using the file countries.shp of the sample data
(http://udig.refractions.net/files/docs/data-v1_1.zip)
Same answer as your question on the GeoServer list: the code is not
there (both GeoServer and uDig share the same classes to do the
actual filtering work, located in GeoTools)
Ah, for those that are not subscribed to the GeoServer mailing lists,
here is the interesting part of the discussion:
---------------------------------------------------------
Andrea Aime ha scritto:
> > siddharth raghuvanshi ha scritto:
>> >> Hi,
>> >>
>> >> I am trying to use CQL for spatial queries in Geoserver. But when
I am
>> >> giving the query DWITHIN(the_geom, POINT(-97 38), 200,
kilometers), its
>> >> not taking into account whether the unit is given in kilometers,
>> >> meters,feet or any other unit, I mean the result remains the
same. Can
>> >> anyone please tell me, how to correct this.
> >
> > By adding code to support distance evaluations over geographic
> > coordinates. It is simply not there.
> > There is code to do that in PostGIS 1.5, not sure how hard that
> > would be to port back to Java.
Oh, for the curious, most of the relevant code seems to be here:
http://svn.osgeo.org/postgis/tags/1.5.1/liblwgeom/lwgeodetic.c
Hmmm.. GPL license? that might be a problem since if we wanted to
do a Java port it would have to become part of Geotools which is
LGPL...
---------------------------------------------------------
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.