GetMap and post

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GetMap and post

dblasby
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/


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GetMap and post

Magne Skjeret-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[hidden email] 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-----


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GetMap and post

dblasby
In reply to this post by dblasby
Magne,

>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.

Well, SLD came after WMS 1.1.1 so there was never any reason to have
POST in 1.1.1.  When 1.2 "came out", they allowed POST - thats where
the GetMap XML comes from.  I dont know of many 1.2 servers.  When 1.3
came out they got rid of SLD.  So, everything is a bit out-of-wack.

Geoserver is WMS 1.1.1 with SLD.  So, we support the 1.1.1 spec and all
the suggestions in the SLD specification.  They do not say to make any
changes to the capabilities document except to add this:

<UserDefinedSymbolization SupportSLD="1" UserLayer="1" UserStyle="1"
RemoteWFS="0"/>

So, its a bit crazy,

dave
ps. the SLD specification isnt very explicit nor complete!!  I find it
pretty frustrating.  James McGill is heading up the new specification
version, so it should be much better.

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


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GetMap and post

Magne Skjeret-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[hidden email] wrote:

Hi

I got most things sorted now.
I am now getting the image by post and it seems to work great.

But a part of your reply raised some concerns here:
You said: When 1.3 came out they got rid of SLD.

Do you mean that the wms 1.3 spesification does not use SLD anymore?
Is there a equivalent coming or some other way to style the map?


Magne

> Magne,
>
>
>>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.
>
>
> Well, SLD came after WMS 1.1.1 so there was never any reason to have
> POST in 1.1.1.  When 1.2 "came out", they allowed POST - thats where
> the GetMap XML comes from.  I dont know of many 1.2 servers.  When 1.3
> came out they got rid of SLD.  So, everything is a bit out-of-wack.
>
> Geoserver is WMS 1.1.1 with SLD.  So, we support the 1.1.1 spec and all
> the suggestions in the SLD specification.  They do not say to make any
> changes to the capabilities document except to add this:
>
> <UserDefinedSymbolization SupportSLD="1" UserLayer="1" UserStyle="1"
> RemoteWFS="0"/>
>
> So, its a bit crazy,
>
> dave
> ps. the SLD specification isnt very explicit nor complete!!  I find it
> pretty frustrating.  James McGill is heading up the new specification
> version, so it should be much better.
>
> ----------------------------------------------------------
> This mail sent through IMP: https://webmail.limegroup.com/
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

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

iD8DBQFDV2IRDjwfc5lfNZcRAmWAAJ4t2kgzkmvAU859bP7FxE5UVyxhUQCfamRi
VZRz5NPsXh+IEwWAjZGR+lc=
=20uG
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users