How can I get a pixel value from tiff image?

Farid Vakilzadeh jalfarid at GMAIL.COM
Fri Jun 3 17:32:16 EDT 2005


Hi All,

I have a raster tiff image. After displaying it under Mapserver I want
to display each pixel value that I need. Also I don't want to use
MapScript language such as PHP. So far I can query something such as
map coordinates by using  [mapx] and [mapy] in my query template file
but I don't know How I can query pixel value. Some body who knows
please tell me how?  Here is my query template file :

<html>
<head>
 <title> Query Results </title>
</head>
<body>
   <table class="centered" border="1">
      <tr>
         <th>Bounding box</th>
         <td>[minx],[miny],[maxx],[maxy]</td>
      </tr>
      <tr>
         <th>Image Coordinates</th>
         <td>[img.x], [img.y]</td>
      </tr>
      <tr>
         <th>Map Coordinates</th>
         <td>[mapx], [mapy]</td>
      </tr>
      <tr>
         <th>Number of results</th>
         <td>[nr]</td>
      </tr>
      <tr>
         <th>Scale</th>
         <td>[scale]</td>
      </tr>
      <tr>
         <th>Cellsize</th>
         <td>[cellsize]</td>
      </tr>
 </table>
 <hr/>
</body>
</html>

Farid



More information about the mapserver-users mailing list