Take the 2-minute tour ×

I have a GeoTIFF published by Geoserver 2.2 and being used by Leaflet via WMS. How can I get Geoserver to return the raster value at a lat/long point?

I'm guessing it has to do with using WCS, but no examples seem to exist for doing this!

This will be similar to querying PostGIS with ST_Value(raster, ST_SetSRID(ST_Point(lon,lat),4326)). I dont really want to import the same raster into PostGIS just to find the raster value at a point. Or is this the recommended solution?

share|improve this question
add comment

2 Answers

GeoServer will serve the raster value as a GetFeatureInfo of the WMS service. To see this in action, go to the Layer-Preview page, select your layer and just click on the map. On the bottom, you will see your raster value (either RGB triplet or your TIFF channel(s)).

There is an example of GetFeatureInfo with Leaflet. There is also an OpenLayers example.

share|improve this answer
add comment

Your Answer


