[Geoserver-users] GetMap and post

Magne,

You can send SLD-POST request directly to the Geoserver WMS. There are
not many examples of how to do this because very few people actually
use it because browsers dont really support HTTP-POST for <IMG> tags.

Geoserver fully supports the OGC SLD spec, and you can send SLD to
geoserver in these 4 ways:

a) (http get) SLD=(URL) geoserver makes an http location to the SLD and
loads it

b) (http get) SLD_BODY=... send an SLD file to geoserver using GET

c) (http post) WMS GetMap 1.2 request Send the SLD (and other request
parameters) in a POST XML document. This is how the SLD spec says you
should do it.

d) (http post) GET Parameters, SLD in the Post Use http GET for the
parameters (ie. location and image size) and use POST for the SLD

I'd like to see some SLD-POST examples (or GetMap XML POST) in the
demo's page (we're improving it right now). Here's the jira task if
you want to add any comments to it:

http://jira.codehaus.org/browse/GEOS-424

dave

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

dblasby@anonymised.com wrote:

Magne,

You can send SLD-POST request directly to the Geoserver WMS. There are
not many examples of how to do this because very few people actually
use it because browsers dont really support HTTP-POST for <IMG> tags.

Hi

I understand, but I think there are limitations on the length of a get
request. Especially in IE this is a problem. I have emperically found
that the limit is about 2500 chars, but I am not 100% sure about that.
Nor am I sure if it is a http, tcp/ip or a browser problem/limitation.
I find that get is a bit unsafe method as the SLD might get rather large
for many polygons.

Currently I am using SLD http callback to stream the SLD in, but since
the image src is done in the browser client side, there is no guarantee
that it will work.
E.g. if the map server is placed behind the firewall, the web server is
of course out in the open.
The map image will then be broken because the user can't get to the
mapserver behind the firewall.

So my plan was then to POST the sld and buffer the image bytes in the
webserver, and stream it back to the user from the open webserver. So
the img src is to the webserver and not the map server.
I would do the POST backend using HTTPClient or other usable component.

Nor does the GetMap capabilities say that it does support POST, so it is
hard to make a generic solution that will work for all OGC compliant wms
out there. To actually check the capabilities of the server.
If it is supported I guess it should go in capabilities?

I am investigating post further. It works fine to use the wfs wrapper
with my input, so it must be possible to create some backend support too.

Magne

Geoserver fully supports the OGC SLD spec, and you can send SLD to
geoserver in these 4 ways:

a) (http get) SLD=(URL) geoserver makes an http location to the SLD and
loads it

b) (http get) SLD_BODY=... send an SLD file to geoserver using GET

c) (http post) WMS GetMap 1.2 request Send the SLD (and other request
parameters) in a POST XML document. This is how the SLD spec says you
should do it.

d) (http post) GET Parameters, SLD in the Post Use http GET for the
parameters (ie. location and image size) and use POST for the SLD

I'd like to see some SLD-POST examples (or GetMap XML POST) in the
demo's page (we're improving it right now). Here's the jira task if
you want to add any comments to it:

http://jira.codehaus.org/browse/GEOS-424

dave

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDV0/TDjwfc5lfNZcRAhf7AKDEimP02BXpp5Ng9/8zhhS7Q6pOMgCfUVYV
ijlU0ti+Y78dbhYLNabEVnY=
=MrOh
-----END PGP SIGNATURE-----