[Geoserver-users] Did something change for getfeatureInfo between 1.7.2. and 1.7.5?

I have a bunch of student projects
(http://webmapping.mgis.psu.edu/geoserver/www/index.html) which all
worked fine when I marked them 4 months ago - but now they work
*except* for getfeatureInfo requests, compare

http://webmapping.mgis.psu.edu/geoserver-1.7.2/wms?WIDTH=600&SRS=EPSG%3A4326&LAYERS=topp%3APaStateRoads&HEIGHT=455&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-76.828171%2C40.087139%2C-76.066728%2C40.664567&X=413&Y=231&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84

and

http://webmapping.mgis.psu.edu/geoserver/wms?WIDTH=600&SRS=EPSG%3A4326&LAYERS=topp%3APaStateRoads&HEIGHT=455&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-76.828171%2C40.087139%2C-76.066728%2C40.664567&X=413&Y=231&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84

These servers share a common data directory so I'm at a loss here.

Ian
--

Ian Turton
http://www.geotools.org
http://pennspace.blogspot.com/

Ian Turton ha scritto:

I have a bunch of student projects
(http://webmapping.mgis.psu.edu/geoserver/www/index.html) which all
worked fine when I marked them 4 months ago - but now they work
*except* for getfeatureInfo requests, compare

http://webmapping.mgis.psu.edu/geoserver-1.7.2/wms?WIDTH=600&SRS=EPSG%3A4326&LAYERS=topp%3APaStateRoads&HEIGHT=455&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-76.828171%2C40.087139%2C-76.066728%2C40.664567&X=413&Y=231&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84

and

http://webmapping.mgis.psu.edu/geoserver/wms?WIDTH=600&SRS=EPSG%3A4326&LAYERS=topp%3APaStateRoads&HEIGHT=455&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-76.828171%2C40.087139%2C-76.066728%2C40.664567&X=413&Y=231&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84

These servers share a common data directory so I'm at a loss here.

There has been many changes, yes. Please enable "verbose exceptions"
in the server configuration so that we can have a look at what went wrong.

Btw, I strongly recommend against using 1.7.5 due to
http://blog.geoserver.org/2009/07/03/geoserver-175-critical-wms-patch/
If you can upgrade to 1.7.6, otherwise at least patch 1.7.5

Cheers
Andrea

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

On Tue, Aug 25, 2009 at 7:16 AM, Andrea Aime<aaime@anonymised.com> wrote:

Ian Turton ha scritto:

I have a bunch of student projects
(http://webmapping.mgis.psu.edu/geoserver/www/index.html) which all
worked fine when I marked them 4 months ago - but now they work
*except* for getfeatureInfo requests, compare

http://webmapping.mgis.psu.edu/geoserver-1.7.2/wms?WIDTH=600&SRS=EPSG%3A4326&LAYERS=topp%3APaStateRoads&HEIGHT=455&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-76.828171%2C40.087139%2C-76.066728%2C40.664567&X=413&Y=231&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84

and

http://webmapping.mgis.psu.edu/geoserver/wms?WIDTH=600&SRS=EPSG%3A4326&LAYERS=topp%3APaStateRoads&HEIGHT=455&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-76.828171%2C40.087139%2C-76.066728%2C40.664567&X=413&Y=231&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84

These servers share a common data directory so I'm at a loss here.

There has been many changes, yes. Please enable "verbose exceptions"
in the server configuration so that we can have a look at what went wrong.

OK - but the error message is the same. I've attached the log file

Btw, I strongly recommend against using 1.7.5 due to
http://blog.geoserver.org/2009/07/03/geoserver-175-critical-wms-patch/
If you can upgrade to 1.7.6, otherwise at least patch 1.7.5

I patched it - I try to avoid upgrading the server during term time
(because things like this happen :-))

Ian

--

Ian Turton
http://www.geotools.org
http://pennspace.blogspot.com/

tmp.txt (5.63 KB)

Ian Turton ha scritto:

On Tue, Aug 25, 2009 at 7:16 AM, Andrea Aime<aaime@anonymised.com> wrote:

Ian Turton ha scritto:

I have a bunch of student projects
(http://webmapping.mgis.psu.edu/geoserver/www/index.html) which all
worked fine when I marked them 4 months ago - but now they work
*except* for getfeatureInfo requests, compare

http://webmapping.mgis.psu.edu/geoserver-1.7.2/wms?WIDTH=600&SRS=EPSG%3A4326&LAYERS=topp%3APaStateRoads&HEIGHT=455&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-76.828171%2C40.087139%2C-76.066728%2C40.664567&X=413&Y=231&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84

and

http://webmapping.mgis.psu.edu/geoserver/wms?WIDTH=600&SRS=EPSG%3A4326&LAYERS=topp%3APaStateRoads&HEIGHT=455&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-76.828171%2C40.087139%2C-76.066728%2C40.664567&X=413&Y=231&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84

These servers share a common data directory so I'm at a loss here.

There has been many changes, yes. Please enable "verbose exceptions"
in the server configuration so that we can have a look at what went wrong..

OK - but the error message is the same. I've attached the log file

This time is much more informative. And I finally got why it's not working: the request you're making is invalid, older GeoServer did
not care, new one does because it tries to access the style for each
layer (to estimate the search radius layer by layer by style inspection,
e.g., you have points 20 pix wide, the search radius for that layer
becomes 10 pix).

Now, layer <-> style association is done parsing the GEtMap portion
of the request, that just states:

&LAYERS=topp%3APaStateRoads&styles=

meaning a style is retrieved for PaStateRoads, but then the
query layers are:

QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84

for which no styles have been parsed.

The spec is not super clear about this:

"The required QUERY_LAYERS parameter states the map layer(s) from which feature
information is desired to be retrieved. Its value is a comma-separated list of one or more
map layers. This parameter shall contain at least one layer name, but may contain fewer
layers than the original GetMap request."

But I think the meaning should be that the query_layers are to be a
subset of the "layers" param?

I'm inclined to change the code so that it throws an exception
explaining the request is invalid. What do you think?

Cheers
Andrea

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

On Wed, Aug 26, 2009 at 3:06 AM, Andrea Aime<aaime@anonymised.com> wrote:

Ian Turton ha scritto:

On Tue, Aug 25, 2009 at 7:16 AM, Andrea Aime<aaime@anonymised.com> wrote:

Ian Turton ha scritto:

I have a bunch of student projects
(http://webmapping.mgis.psu.edu/geoserver/www/index.html) which all
worked fine when I marked them 4 months ago - but now they work
*except* for getfeatureInfo requests, compare

http://webmapping.mgis.psu.edu/geoserver-1.7.2/wms?WIDTH=600&SRS=EPSG%3A4326&LAYERS=topp%3APaStateRoads&HEIGHT=455&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-76.828171%2C40.087139%2C-76.066728%2C40.664567&X=413&Y=231&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84

and

http://webmapping.mgis.psu.edu/geoserver/wms?WIDTH=600&SRS=EPSG%3A4326&LAYERS=topp%3APaStateRoads&HEIGHT=455&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-76.828171%2C40.087139%2C-76.066728%2C40.664567&X=413&Y=231&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84

These servers share a common data directory so I'm at a loss here.

There has been many changes, yes. Please enable "verbose exceptions"
in the server configuration so that we can have a look at what went
wrong..

OK - but the error message is the same. I've attached the log file

This time is much more informative. And I finally got why it's not working:
the request you're making is invalid, older GeoServer did
not care, new one does because it tries to access the style for each
layer (to estimate the search radius layer by layer by style inspection,
e.g., you have points 20 pix wide, the search radius for that layer
becomes 10 pix).

Now, layer <-> style association is done parsing the GEtMap portion
of the request, that just states:

&LAYERS=topp%3APaStateRoads&styles=

meaning a style is retrieved for PaStateRoads, but then the
query layers are:

QUERY_LAYERS=topp%3Atest2,topp%3Astationswgs84,topp%3Ahospitalswgs84

for which no styles have been parsed.

The spec is not super clear about this:

"The required QUERY_LAYERS parameter states the map layer(s) from which
feature
information is desired to be retrieved. Its value is a comma-separated list
of one or more
map layers. This parameter shall contain at least one layer name, but may
contain fewer
layers than the original GetMap request."

But I think the meaning should be that the query_layers are to be a
subset of the "layers" param?

Hmm that is ambiguous, I hadn't noticed that there was a mismatch
between the LAYERS and QUERY_LAYERS (I think this is an artifact of
the OpenLayers method the students were using).

I think that your interpretation is a good one but that a better error
message is needed.

Do you need me to create a JIRA or will you?

Ian

Hi Ian,

Ian Turton wrote:

Hmm that is ambiguous, I hadn't noticed that there was a mismatch
between the LAYERS and QUERY_LAYERS (I think this is an artifact of
the OpenLayers method the students were using).
  
Can you please explain which OpenLayers method they were using? Just in
case there is something that could be fixed on the OpenLayers side.

Thanks!
Andreas.

--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.