2

I'm using this WMS service http://www.cartografiarl.regione.liguria.it/mapfiles/repertoriocartografico/LAVORIINCORSO/1633.asp?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0&

I can query it using GetFeatureInfo in a WMS request like this one: http://www.cartografiarl.regione.liguria.it/mapfiles/repertoriocartografico/LAVORIINCORSO/1633.asp?&LAYERS=L4313&QUERY_LAYERS=L4313&STYLES=&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=1018299.271264%2C5479845.539429%2C1123018%2C5492228.338009&FEATURE_COUNT=10&HEIGHT=162&WIDTH=1370&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A3857&X=891&Y=22&

The response is:

1086509.551130,5490410.633321 1086509.551130,5490410.633321 4 011023_002 Riccò Del Golfo Via Aurelia, Snc 03 immobile destinato autorimessa 1 21/10/05 altre associazioni a delinquere 03 destinato 19/07/2007 02 Comune istituzionali PRO_ciuffardi_paolo.pdf 011023_002_F.pdf 1086505.336252,5490406.481274 1086505.336252,5490406.481274 3 011023_001 Riccò Del Golfo Via Aurelia, Snc 03 immobile destinato appartamento 1 21/10/05 altre associazioni a delinquere 03 destinato 19/07/2007 02 Comune sociali PRO_ciuffardi_paolo.pdf 011023_001_F.pdf

Now I'd like to do the same request but for a bigger BBOX for example http://www.cartografiarl.regione.liguria.it/mapfiles/repertoriocartografico/LAVORIINCORSO/1633.asp?&LAYERS=L4313&QUERY_LAYERS=L4313&STYLES=&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=832454%2C5423777%2C1118664%2C5564559&FEATURE_COUNT=100&HEIGHT=162&WIDTH=1370&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A3857&X=891&Y=22&

I receive no response and no error ......Too big the bbox?

2
  • are you querying the same spot but with a bigger area? If you do, you should get the same response.
    – Gery
    Apr 5, 2015 at 17:50
  • @Gery It is not at all the same spot. The image in my answer should clarify it.
    – user30184
    Apr 15, 2015 at 8:00

1 Answer 1

4

The X and Y coordinates in the GetFeatureInfo query mean the pixel coordinates of the image that is created with the GetMap parameters which are included in the request. You can't change the BBOX parameters independently from the X and Y parameters and suppose that the result would be the same.

In your first case the request contains these parameters for the GetMap query

BBOX=1018299.271264,5479845.539429,1123018,5492228.338009
WIDTH=1370&&HEIGHT=162

GetFeatureInfo request it using parameters X=891&Y=22 which means "891 pixels to the left and 22 pixels down from the top left corner (min easting, max northing) of the map".

In your first case

Top-left: 1018299,5492228
Pixel size W-E: (1123018-1018299)/1370 = 76.43722628
Pixel size N-S: (5492228-5479845)/162 = 76.43722628
Coordinates at image coordinates 891,22 = 1086404.569,5490546.358

In the second case

Top-left: 832454,5564559
Pixel size W-E: (1118664-832454)/1370 = 208.9124088
Pixel size N-S: (5564559-5479845)/162 = 869.0246914
Coordinates at image coordinates 891,22 = 1018594.956,5545440.457

In the image below you can see the both BBOXes and query points. There is no data in the query point 2 and therefore you are getting an empty result.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.