Hum, a filter is just a selection mean, it won't make the GetFeature return a processed result such as the centroid of a polygon.
What you're looking for seems to be WPS (Web Processing Service), but
we don't ship with one at the moment, thought there are some attempts
to provide a WPS plugin for Geoserver (none is really release quality
afaik, but I may be wrong).
Hum, a filter is just a selection mean, it won't make the GetFeature
return a processed result such as the centroid of a polygon.
What you're looking for seems to be WPS (Web Processing Service), but
we don't ship with one at the moment, thought there are some attempts
to provide a WPS plugin for Geoserver (none is really release quality
afaik, but I may be wrong).
Cheers
Andrea
Thanks for your reply.
So is there no way of expressing "SELECT centroid(the_geom) FROM myTable"
in a WFS or WMS request? I can only do "SELECT the_geom FROM myTable WHERE
centroid(the_geom) = whatever"? Is this right?
So is there no way of expressing "SELECT centroid(the_geom) FROM myTable" in a WFS or WMS request? I can only do "SELECT the_geom FROM myTable WHERE
centroid(the_geom) = whatever"? Is this right?
In WFS no, there's no way to select something other than the actual properties. This is the job of WPS, which unfortunately we don't support at the moment.
In WMS, yes, you can do that instead, in particular, you can have your
styling depend on whatever complex expression you want, so if you want to label exactly the centroid, you can use the centroid function to
extract it.
As Andrea states there is no way in WFS to ask for the centroid of a property. What you could so is create a view of your table in the database which pre calculates the centroid storing it as a regular property.
CREATE VIEW myview as SELECT centroid(the_geom) as "the_geom" from myTable
You would then have to manually insert an entry into the "geometry_columns" table for the view.
I am not sure if this is an acceptable solution for you, but just thougth I would suggest it.
So is there no way of expressing "SELECT centroid(the_geom) FROM myTable" in a WFS or WMS request? I can only do "SELECT the_geom FROM myTable WHERE
centroid(the_geom) = whatever"? Is this right?
As Andrea states there is no way in WFS to ask for the centroid of a
property. What you could so is create a view of your table in the
database which pre calculates the centroid storing it as a regular
property.
CREATE VIEW myview as SELECT centroid(the_geom) as "the_geom" from myTable
You would then have to manually insert an entry into the
"geometry_columns" table for the view.
I am not sure if this is an acceptable solution for you, but just
thougth I would suggest it.
So is there no way of expressing "SELECT centroid(the_geom) FROM
myTable"
in a WFS or WMS request? I can only do "SELECT the_geom FROM myTable
WHERE
centroid(the_geom) = whatever"? Is this right?