Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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