Hi,
No i don't try to mix distances. My layers are in ora 90112 projection
so kilometers is valid.
Since there is no way a join can be specified I tried another solution.
I will tell a bit about the solution here maybe someone can benefit 
I created a view with the geometry of the points I wanted to show on the
map.
I joined this data with the regions table (specifying the complex
polygons) and added 3 columns to the view with the following syntax
SDO_WITHIN_DISTANCE(a.geometry, b.geometry, 'distance=0') as WITHIN0KM,
SDO_WITHIN_DISTANCE(a.geometry, b.geometry, 'distance=10000') as
WITHIN10KM,
SDO_WITHIN_DISTANCE(a.geometry, b.geometry, 'distance=25000') as
WITHIN25KM,
Now I can specify a CQL Filter as CQL_FILTER=WITHIN25KM = 'TRUE' and I
get all points within 25 kilometers of the region
Cheers
Kris
-----Original Message-----
From: Andrea Aime [mailto:aaime@anonymised.com]
Sent: Thursday, March 19, 2009 12:18 PM
To: Kris Geusebroek
Cc: geoserver-users
Subject: Re: [Geoserver-users] CQL Filter DWITHIN. How to use it for
getting the features lying within a distance from a complex polygon
Kris Geusebroek ha scritto:
Hi All,
I'm still struggling with this functionality.
What I want is a wms request with a CQL Filter DWITHIN to get all
features within 25 kilometers from a region (like a state)
So for example I want all roads within 25 kilometer from the state
utah.
Are you're trying to mix distances in km but coordinates
in lat/lon? This is simply not supported by GeoServer right now.
The units in dwithin filter are not parsed, and if they were,
the oracle datastore would not know how to encode the
filter.
Which btw is something you already know, since you reported
a jira here:
http://jira.codehaus.org/browse/GEOT-2384
So maybe you're using all projected coordinates?
Because the state has many points I get a very long cql filter (larger
then get request max length)
I don't know if I have the possibility to specify the 2^nd parameter
to
SDO_WITHIN_DISTANCE (yes I'm using Oracle btw.) as some polygon to get
form a different table and how to specify that in my CQL Filter.
No, there is no way to do so, the WFS specification does not allow
for "joins", a single query element can refer to a single table.
Or are there other possible solutions for this.
Yes, you can bypass the limits of a max length of a request using:
- POST with the same structure of the GET, and assign the content
type of "forms": application/x-www-form-urlencoded
- make a standard OGC POST request
For GET requests there is no workaround.
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.