[Geoserver-users] Scale Thresholds - how to get

Hi,

Everything up till ? belongs to base URL. The real WMS query string starts from that. See http://en.wikipedia.org/wiki/Query_string

If the base URL happens to contain /geoserver/wms does not make it as a WMS request.

However, there is an odd thing in the WMS standards. Up till version 1.1.1 SERVICE parameter was not mandatory for GetMap and GetFeatureInfo. Perhaps they have thought it does not need to be because GetMap and GetFeature info does not exist in other OGC services. Obviously they saw that saving one parameter was not worth the trouble and service is mandatory in WMS 1.3.0. In GetCapabilities it has naturally been compulsory always because otherwise the server could not know which OGC service is queried.

The WMS 1.1.1 standard does not say, or at least I can’t see from it, which parameters are compulsory for GetStyles. Reading version 1.3.0 does not help because GetStyles does not exist anymore in that version.

So I cannot say if it is right or wrong that GetStyles with WMS 1.1.1 does not work without SERVICE. According to WMS standard it is OK that GetMap works and thus the query you copy-pasted is OK with WMS 1.1.1 GetMap but not with WMS 1.3.0. Not all WMS servers have even known that GetMap should work without &SERVICE and I would say it not wise at all to make a client to create such requests. If I would correct something I would edit the Geoserver demo requests to contain always the SERVICE parameter. At least it would have saved a couple of hours of both your and my time in this case.

Geoserver documentation claims also that the SERVICE parameter is mandatory and it is good so even it actually is not.

http://docs.geoserver.org/stable/en/user/services/wms/reference.html

-Jukka Rahkonen-

···

Jonathan wrote:

I was basing it on the demo URL’s. None of them have the “&service=wms”. They all have “/geoserver/wms?” instead.

It does work with &service=wms. But doesn’t with the “/geoserver/wms?”.

Should they both act identically? I’d never even noticed they were different before.

Thanks,

Jonathan

On 1 February 2013 15:12, Rahkonen Jukka <Jukka.Rahkonen@anonymised.com6…> wrote:

Hi,

Why not to include &service=wms in the request?

http://localhost:8080/geoserver/ows?service=wms&version=1.1.1&request=getstyles&layers=states

http://localhost:8080/geoserver/ows?service=wms&version=1.1.1&request=getstyles&layers=Img_Sample

-Jukka-

Lähettäjä: Jonathan Moules [mailto:jonathanmoules@anonymised.com]
Lähetetty: 1. helmikuuta 2013 17:03
Vastaanottaja: Rahkonen Jukka
Kopio: geoserver-users@lists.sourceforge.net
Aihe: Re: [Geoserver-users] Scale Thresholds - how to get

Thanks Jukka. That looks like it should do something useful, but it doesn’t seem to work.

Reading the SLD 1.0.0 specs I think the following should do it:

http://wppgeog3:8082/geoserver/wms?request=getStyles&version=1.3.0&layers=OS_Rasters:25000_Colour

But I get a xml failure (WMS 1.0.0, 1.1.0 or 1.3.0):

No such operation wms 1.1.0 getStyles

There doesn’t seem to be a demo URL in the demo’s list for me to work from.

Anyone know how to use this?

Thanks,

Jonathan

On 1 February 2013 14:31, Rahkonen Jukka <Jukka.Rahkonen@anonymised.com> wrote:

Hi,

Just a guess, but see what you get with WMS GetStyles.

-Jukka Rahkonen

Jonathan Moules wrote:

Hi List,

I have a number of layers that have scale denominators (aka, scale thresholds) in their styles and these work correctly.

My question is - is there a way for me to find out from the WMS what these scale denominators are? They don’t appear to show up in a GetCapabilities request or a WMS 1.1.1 “describeLayer” request. I can’t see anything obvious in the spec (ctrl-f for “scale” and “denominator”).

Anyone have any ideas if this is possible?

Thanks,

Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

Thanks for the excellent explanation. I’ve amended GEOS-5552 to point to this thread and suggest adding “service” to the demo URL’s.

If GetStyles doesn’t exist in 1.3.0, is there any alternative way to get the thresholds/styles in that version?

Thanks,
Jonathan

On 4 February 2013 12:34, Rahkonen Jukka <jukka.rahkonen@anonymised.com> wrote:

Hi,

Everything up till ? belongs to base URL. The real WMS query string starts from that. See http://en.wikipedia.org/wiki/Query_string

If the base URL happens to contain /geoserver/wms does not make it as a WMS request.

However, there is an odd thing in the WMS standards. Up till version 1.1.1 SERVICE parameter was not mandatory for GetMap and GetFeatureInfo. Perhaps they have thought it does not need to be because GetMap and GetFeature info does not exist in other OGC services. Obviously they saw that saving one parameter was not worth the trouble and service is mandatory in WMS 1.3.0. In GetCapabilities it has naturally been compulsory always because otherwise the server could not know which OGC service is queried.

The WMS 1.1.1 standard does not say, or at least I can’t see from it, which parameters are compulsory for GetStyles. Reading version 1.3.0 does not help because GetStyles does not exist anymore in that version.

So I cannot say if it is right or wrong that GetStyles with WMS 1.1.1 does not work without SERVICE. According to WMS standard it is OK that GetMap works and thus the query you copy-pasted is OK with WMS 1.1.1 GetMap but not with WMS 1.3.0. Not all WMS servers have even known that GetMap should work without &SERVICE and I would say it not wise at all to make a client to create such requests. If I would correct something I would edit the Geoserver demo requests to contain always the SERVICE parameter. At least it would have saved a couple of hours of both your and my time in this case.

Geoserver documentation claims also that the SERVICE parameter is mandatory and it is good so even it actually is not.

http://docs.geoserver.org/stable/en/user/services/wms/reference.html

-Jukka Rahkonen-

Jonathan wrote:

I was basing it on the demo URL’s. None of them have the “&service=wms”. They all have “/geoserver/wms?” instead.

It does work with &service=wms. But doesn’t with the “/geoserver/wms?”.

Should they both act identically? I’d never even noticed they were different before.

Thanks,

Jonathan

On 1 February 2013 15:12, Rahkonen Jukka <Jukka.Rahkonen@anonymised.com> wrote:

Hi,

Why not to include &service=wms in the request?

http://localhost:8080/geoserver/ows?service=wms&version=1.1.1&request=getstyles&layers=states

http://localhost:8080/geoserver/ows?service=wms&version=1.1.1&request=getstyles&layers=Img_Sample

-Jukka-

Lähettäjä: Jonathan Moules [mailto:jonathanmoules@anonymised.com4942…]
Lähetetty: 1. helmikuuta 2013 17:03
Vastaanottaja: Rahkonen Jukka
Kopio: geoserver-users@lists.sourceforge.net
Aihe: Re: [Geoserver-users] Scale Thresholds - how to get

Thanks Jukka. That looks like it should do something useful, but it doesn’t seem to work.

Reading the SLD 1.0.0 specs I think the following should do it:

http://wppgeog3:8082/geoserver/wms?request =getStyles&version=1.3.0&layers=OS_Rasters:25000_Colour

But I get a xml failure (WMS 1.0.0, 1.1.0 or 1.3.0):

No such operation wms 1.1.0 getStyles

There doesn’t seem to be a demo URL in the demo’s list for me to work from.

Anyone know how to use this?

Thanks,

Jonathan

On 1 February 2013 14:31, Rahkonen Jukka <Jukka.Rahkonen@anonymised.com> wrote:

Hi,

Just a guess, but see what you get with WMS GetStyles.

-Jukka Rahkonen

Jonathan Moules wrote:

Hi List,

I have a number of layers that have scale denominators (aka, scale thresholds) in their styles and these work correctly.

My question is - is there a way for me to find out from the WMS what these scale denominators are? They don’t appear to show up in a GetCapabilities request or a WMS 1.1.1 “describeLayer” request. I can’t see anything obvious in the spec (ctrl-f for “scale” and “denominator”).

Anyone have any ideas if this is possible?

Thanks,

Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

On Mon, Feb 4, 2013 at 2:29 PM, Jonathan Moules <jonathanmoules@anonymised.com.4942…> wrote:

Thanks for the excellent explanation. I’ve amended GEOS-5552 to point to this thread and suggest adding “service” to the demo URL’s.

If GetStyles doesn’t exist in 1.3.0, is there any alternative way to get the thresholds/styles in that version?

GetStyles is an operation fully defined in the SLD standard (which adds a few operations extending the base WMS standard),
you should have a look there.
However, it should work fine also with version=1.3.0 in GeoServer

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Hi Andrea,
Nope, Sorry. 1.3.0 (and 1.0.0) returns:



No such operation wms 1.3.0 getstyles

Using the URL:

http://wppgeog3:8082/geoserver/ows?service=wms&version=1.3.0&request=getstyles&layers=OS_Rasters:25000_Colour

The only part that I changed was the version. It works fine as 1.1.1 but neither of the other two.

I might be missing something obvious though (wouldn’t be the first time :wink: ).

Cheers,
Jonathan

On 4 February 2013 13:38, Andrea Aime <andrea.aime@anonymised.com7…> wrote:

On Mon, Feb 4, 2013 at 2:29 PM, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

Thanks for the excellent explanation. I’ve amended GEOS-5552 to point to this thread and suggest adding “service” to the demo URL’s.

If GetStyles doesn’t exist in 1.3.0, is there any alternative way to get the thresholds/styles in that version?

GetStyles is an operation fully defined in the SLD standard (which adds a few operations extending the base WMS standard),
you should have a look there.
However, it should work fine also with version=1.3.0 in GeoServer

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.