[Geoserver-users] Store filter XML server-side

Hi,

I have a WMS GetMap request that uses a <filter>

Is it possible to store the filter XML in a server-side file and then
reference the file's URL in the GetMap request - similar to the way SLD
files can be referenced by a URL?

Thanks (again),
Dave
--
View this message in context: http://www.nabble.com/Store-filter-XML-server-side-tp21420493p21420493.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi David,

Unfortunately not. You are stuck with only the ability to reference SLD files itself from a URL, not individual filters. Feel free to file a feature request for this though.

-Justin

djud wrote:

Hi,

I have a WMS GetMap request that uses a <filter>

Is it possible to store the filter XML in a server-side file and then
reference the file's URL in the GetMap request - similar to the way SLD
files can be referenced by a URL?

Thanks (again),
Dave

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Okay, thanks Justin for your help. I will file a feature request.

Cheers.

--
View this message in context: http://www.nabble.com/Store-filter-XML-server-side-tp21420493p21431725.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

djud ha scritto:

Hi,

I have a WMS GetMap request that uses a <filter>

Is it possible to store the filter XML in a server-side file and then
reference the file's URL in the GetMap request - similar to the way SLD
files can be referenced by a URL?

Just as two extra options:
- you can use CQL_FILTER, the syntax is more compact, it may fit
- you can also use POST GetMap requests, GeoServer supports them as
   well (look in the sample request of a standard install, there are
   some samples).

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Thanks Andrea,

I don't think CQL_FILTER will be compact enough for a GET - I have a large
filter.

I'm trying the POST GetMap request but, as OpenLayers only supports GET, I'm
having to write a servlet that that redirects the request to geoserver and
then streams the resulting images back to the client. This seems to be a
very slow process.

That's why using a filter file would make it all much more efficient - I
could still use a GET request.

Is the POST XML documented? For instance how do I specify the SRS?

Cheers

--
View this message in context: http://www.nabble.com/Store-filter-XML-server-side-tp21420493p21433316.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

djud ha scritto:

Thanks Andrea,

I don't think CQL_FILTER will be compact enough for a GET - I have a large
filter.

I'm trying the POST GetMap request but, as OpenLayers only supports GET, I'm
having to write a servlet that that redirects the request to geoserver and
then streams the resulting images back to the client. This seems to be a
very slow process.

That's why using a filter file would make it all much more efficient - I
could still use a GET request.

If you need it now, you can implement it relatively easily by patching
the GetMapKvpRequestReader class inside the wms module (and then attach the patch to http://jira.codehaus.org/browse/GEOS-2562)?

Is the POST XML documented? For instance how do I specify the SRS?

It was part of the WMS 1.2 specification that never saw the light,
I guess GeoServer took part of some prototyping for OGC and thus
have this support.

So I don't know of any documentation other than reading the code
that parses the request itself, which is in the GetMapXmlReader
class (wms module). As for the srs, it seems you have to specify
a srsName attribute in the BoundingBox element (that's what
I gather reading the code at least).

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Okay, I'll have a look at the code (ahhhhhh!) - a filter file would be much
more convenient for me.

If it works, I'll add the patch to the feature request.

Thanks.

--
View this message in context: http://www.nabble.com/Store-filter-XML-server-side-tp21420493p21433710.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

djud ha scritto:

Okay, I'll have a look at the code (ahhhhhh!) - a filter file would be much
more convenient for me.

Nice. The developer guide should help get you started:
http://geoserver.org/display/GEOSDOC/Developers+Guide

And you can always ask on GeoServer irc channel (hosted by irc.freenode.net) for details.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.