[Geoserver-users] GetFeatureInfo giving no results - sometimes

Hi List,
My GeoServer is behaving a little weirdly and is giving “gml:boundedBygml:nullunknown</gml:null></gml:boundedBy>” (I guess that means “no results”) as a result for GetFeatureInfo queries.
The problem is I can guarantee there’s a feature at that location.

Both of these queries are for the same area at the same scale - 1:40,000.
The layer has a scale threshold of 1:40,000 and is displaying fine (via WMS).

This one works:
/geoserver/ows?LAYERS=OS_CP_POLYGON_POSTCODES&QUERY_LAYERS=OS_CP_POLYGON_POSTCODES&STYLES=&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=424637.3%2C265510.1%2C435904.5%2C274234.9&FEATURE_COUNT=8&HEIGHT=779&WIDTH=1006&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A27700&X=496&Y=477

This one returns “unknown”.
/geoserver/ows?LAYERS=OS_CP_POLYGON_POSTCODES&QUERY_LAYERS=OS_CP_POLYGON_POSTCODES&STYLES=&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=424366.4%2C265637.6%2C435633.6%2C274362.4&FEATURE_COUNT=50&HEIGHT=779&WIDTH=1006&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A27700&X=525&Y=514

The only differences are bolded (BBOX and X/Y). I don’t think it’s the X/Y.

I suspect this is a result of a rounding error. I don’t have a tool to do it, but I suspect the bounding box for the second one is probably 40000.5 or something, which gets rounded up to 40001. This is outside of the Scale Threshold so no features are returned.


So questions:

  • Does anyone have or know of a tool to calculate scale from bboxes and width/height? Google isn’t getting me far.
  • Has anyone encountered this before?

I guess I can change the scale threshold to 1:40010 or something, but I’d rather not.

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.

Hi Jonathan,

Yes there is a brilliant tool for it and it is called Geoserver.
But, seriously:
Create a new Gridset from EPSG:27700, in which you are entering your
bounding box and the image width and height as tile width and height.

Then create level0 and voila you will see that it is a tiny fraction above
1:40,000

http://lctest.land.vic.gov.au/cm/Create_a_new_gridset.gif

Well, it's not meant for that but you can do it.

Cheers

Christian

-----
____________________________

Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GetFeatureInfo-giving-no-results-sometimes-tp5070805p5071391.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Jonathan,

I noticed I took the wrong values (i.e. the ones that worked). The other
values end up with exactly the same scale: 1 : 40,000.00000000022

So from the point of view of Geoserver, both are identical and both are
slightly above. However, the principle of how you can use the 'create
gridset' sort of creatively is correct. So, very likely it is not the scale
or rounding, but try it with 40010, to exclude that it isn't.

Cheers

Christian

-----
____________________________

Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GetFeatureInfo-giving-no-results-sometimes-tp5070805p5071392.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

HI Christian,
This GeoServer thing sounds quite interesting, I’ll have to give it a try. :wink:

Well, it’s not meant for that but you can do it.

and in the best spirit of traditional hacking, it works great.


Onto the problem. It seems I may have copied/pasted a “broken” one into the “working” in my original email. Ooops.

So I did it again using the same layer with:

se:MaxScaleDenominator40000</se:MaxScaleDenominator>

The GetMap request that precedes the GetFeatureInfo. This Works.

http://wppgeog3/geoserver/ows?buffer=5&LAYERS=OS_CP_POLYGON_POSTCODES&TRANSPARENT=TRUE&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A27700&INFO_FORMAT=application%2Fvnd.ogc.gml&BBOX=424372,259328,441272.8,272415.2&WIDTH=1509&HEIGHT=1168

The tool says this has a scale of 400017.123… - I’ve re-entered the numbers twice and can confirm that’s what the Gridset says the scale is. So at least in theory, it shouldn’t be responding with the map but is.


Then I do the GetFeatureInfo. This doesn’t work.

http://wppgeog3/geoserver/ows?buffer=5&LAYERS=OS_CP_POLYGON_POSTCODES&QUERY_LAYERS=OS_CP_POLYGON_POSTCODES&STYLES=&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=427188.8%2C261509.2%2C438456%2C270234&FEATURE_COUNT=50&HEIGHT=779&WIDTH=1006&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A27700&X=454&Y=362

The tool says this has a scale of 40,000.000000000044.


If I change my SLD to:

se:MaxScaleDenominator40001</se:MaxScaleDenominator>

That GetFeatureInfo now works!

So the problem looks very much like a rounding issue. For whatever reason the GetMap requests are extremely lax in their tolerance of the SLD scale, but the GetFeatureInfo is incredibly strict to the tune that a rounding error in the hundreds of billionths is enough to disallow it.

I’ve created a JIRA issue for this - http://jira.codehaus.org/browse/GEOS-5961 - I’m surprised this hasn’t come up before; we’re using an OpenLayers based client so I can’t be the first person to encounter it.

Thanks again!
Jonathan

On 8 August 2013 01:35, cmaul <Christian.Maul@anonymised.com.4794…> wrote:

Jonathan,

I noticed I took the wrong values (i.e. the ones that worked). The other
values end up with exactly the same scale: 1 : 40,000.00000000022

So from the point of view of Geoserver, both are identical and both are
slightly above. However, the principle of how you can use the ‘create
gridset’ sort of creatively is correct. So, very likely it is not the scale
or rounding, but try it with 40010, to exclude that it isn’t.

Cheers

Christian



Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813

View this message in context: http://osgeo-org.1560.x6.nabble.com/GetFeatureInfo-giving-no-results-sometimes-tp5070805p5071392.html

Sent from the GeoServer - User mailing list archive at Nabble.com.


Get 100% visibility into Java/.NET code with AppDynamics Lite!
It’s a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

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.