0

I have succesfully typed a GetFeatureInfo request with the following structure directly into my browser:

http://192.168.1.20/geoserver/workspace/ows?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&CRS=CRS:84&BBOX=39.32295698174142,-8.4236378760969881,39.363077494358599,-8.3933494101086144&WIDTH=1114&HEIGHT=841&LAYERS=layer&QUERY_LAYERS=layer&FORMAT=image/png&INFO_FORMAT=application/json&FEATURE_COUNT=50&I=396&J=579   

It returns me onto the screen:

{"type":"FeatureCollection","features":[{"type":"Feature","id":"","geometry":null,"properties":{"GRAY_INDEX":162}}]}    

This image was a 8-bit jpeg.

Now, when I try to do the same over a 16-bit raster image, it does not return any value:

{"type":"FeatureCollection","features":[]}    

I was wondering whether the raster type is a key-fact0r on this issue.

Do I have to run the query in a different way?

1

If that Geoserver is your own you can have a look at the "sfdem" demo layer. The GeoTIFF DEM file "sfdem.tif" that is used as a source it 32-bit as you can check with gdalinfo:

Band 1 Block=256x256 Type=Float32, ColorInterp=Gray

You can run GetFeatureInfo for this 32-bit raster image and get a response.

> http://localhost:8080/geoserver/sf/wms?REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=580470%2C4906552.851563%2C618510%2C4935157.148438&SERVICE=WMS&INFO_FORMAT=application/json&QUERY_LAYERS=sf%3Asfdem&FEATURE_COUNT=50&Layers=sf%3Asfdem&WIDTH=512&HEIGHT=385&format=image%2Fjpeg&styles=&srs=EPSG%3A26713&version=1.1.1&x=273&y=164

I get a result

{"type":"FeatureCollection","features":[{"type":"Feature","id":"","geometry":null,"properties":{"GRAY_INDEX":1187}}]}

I would say that the GetFeatureInfo should work also with your 16-bit image. I can't say what goes wrong for you but I would first check that the BBOX of the query is inside the area of your 16-bit image.

1
  • Finally, it turns out that effectively 16-bit are readable. The thing is that I was trying to access via external ip, not localhost, and I didn't know that the 16-bit image was somehow blocked because there was a Data Security rule enabled and associated with that workspace. After removing that rule, in the same way the 8-bit is accessible, so the 16-bit does. Thanks for your post. – Web-GIS entrepreneur May 15 '14 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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