Thanks for the very helpful information Andrea!

Chris

From: Andrea Aime [mailto:[email protected]]
Sent: 14 August 2019 08:16
To: Chris Buckmaster
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GetFeatureInfo WMS v1.3.0 issue with I and J 
parameters

Hi Chris,
GWC is running inside GeoServer, that may make you think that they play by the 
same rules... but they don't.
GeoServer WMS is accessible at this address, and the request works:

https://maps.runnymede.gov.uk/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&FORMAT=image%2Fpng&TRANSPARENT=true&QUERY_LAYERS=council%3Apolling_districts&LAYERS=council%3Apolling_districts&SRS=EPSG%3A27700&TILED=true&INFO_FORMAT=application%2Fjson&I=174&J=127&WIDTH=256&HEIGHT=256&CRS=EPSG%3A27700&STYLES=&BBOX=492761%2C164864%2C499929%2C172032

The "full WMS" GWC extension you're using is instead managed directly by GWC, 
it's not sharing
code with GeoServer, and has a different behavior. I cannot find indications as 
to which versions of WMS are supported
on that endpoint, but it's really old and has not been touched in ages, by that 
I'm guessing it was designed to work
only with WMS 1.1.
Indeed the code has no indication of supporting I and J, see here:

https://github.com/GeoWebCache/geowebcache/blob/master/geowebcache/wms/src/main/java/org/geowebcache/service/wms/WMSService.java#L377

I also don't see support for the WMS 1.3 own version of axis flipping 
(EPSG:4326 interpreted as north/east)... which makes me notice another thing,
in WMS 1.3 the output crs is called "CRS" not "SRS", GeoServer is tolerant 
about the difference (same codebase implements both services) but
the properly formed request would be:

https://maps.runnymede.gov.uk/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&FORMAT=image%2Fpng&TRANSPARENT=true&QUERY_LAYERS=council%3Apolling_districts&LAYERS=council%3Apolling_districts&CRS=EPSG%3A27700&TILED=true&INFO_FORMAT=application%2Fjson&I=174&J=127&WIDTH=256&HEIGHT=256&CRS=EPSG%3A27700&STYLES=&BBOX=492761%2C164864%2C499929%2C172032

Long story short:

  *   If you want to use WMS 1.3 stick to the GeoSever WMS
  *   If you want to use GWC own WMS stick to WMS 1.1
  *   If you want to use both at the same time, WMS 1.3 support for GWC needs 
to be written (could be a bunch of extra ifs in the existing code, most of the 
behavior is similar).. pull requests welcomed ;-)
Cheers
Andrea



On Tue, Aug 13, 2019 at 7:53 PM Chris Buckmaster via Geoserver-users 
<[email protected]<mailto:[email protected]>>
 wrote:
Hi

I am trying to send a GetFeatureInfo request using WMS v1.3.0 via OpenLayers 
but am receiving the below error message from GeoWebCache:

“400: The parameters for x and y must both be positive integers.”

On looking at the GeoServer reference 
manual<https://docs.geoserver.org/stable/en/user/services/wms/reference.html>, 
when working with v1.3.0 it should be using the ‘I’ and ‘J’ parameters rather 
than ‘X’ and ‘Y’ – if I change it to ‘X’ and ‘Y’ it works but OpenLayers uses 
‘I’ and ‘J’ for its WMS request.

I am using GeoServer v2.13.1 and OpenLayers v5.3.

Please see examples below:

(Using WMS version 1.3.0 and I/J parameters – not working)
https://maps.runnymede.gov.uk/geoserver/gwc/service/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&FORMAT=image%2Fpng&TRANSPARENT=true&QUERY_LAYERS=council%3Apolling_districts&LAYERS=council%3Apolling_districts&SRS=EPSG%3A27700&TILED=true&INFO_FORMAT=application%2Fjson&I=174&J=127&WIDTH=256&HEIGHT=256&CRS=EPSG%3A27700&STYLES=&BBOX=492761%2C164864%2C499929%2C172032

(Using WMS version 1.3.0 and X/Y parameters – working)
https://maps.runnymede.gov.uk/geoserver/gwc/service/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&FORMAT=image%2Fpng&TRANSPARENT=true&QUERY_LAYERS=council%3Apolling_districts&LAYERS=council%3Apolling_districts&SRS=EPSG%3A27700&TILED=true&INFO_FORMAT=application%2Fjson&X=174&Y=127&WIDTH=256&HEIGHT=256&CRS=EPSG%3A27700&STYLES=&BBOX=492761%2C164864%2C499929%2C172032




Think before you print this. We are committed to being transparent about why 
and how we collect and use your personal data. Please see our Privacy Statement 
for further details. This message, and associated files, is intended only for 
the use of the individual or entity to which it is addressed and may contain 
information that is confidential or subject to copyright. If you are not the 
intended recipient please note that any copying or distribution of this 
message, or files associated with this message, is strictly prohibited. If you 
have received this message in error, please notify us immediately. Opinions, 
conclusions and other information in this message that do not relate to the 
official business of Runnymede Borough Council shall be understood as neither 
given nor endorsed by Runnymede Borough Council.
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geoserver-users


--

Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit 
http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf 
Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) 
phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 
http://www.geo-solutions.it http://twitter.com/geosolutions_it 
------------------------------------------------------- Con riferimento alla 
normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento 
generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza 
inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è 
un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo 
scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, 
ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene 
notizia. This email is intended only for the person or entity to which it is 
addressed and may contain information that is privileged, confidential or 
otherwise protected from disclosure. We remind that - as provided by European 
Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or 
the information herein by anyone other than the intended recipient is 
prohibited. If you have received this email by mistake, please notify us 
immediately by telephone or e-mail.
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to