[GIS] Selecting and extracting data from TIFF files

geotiff-tiffvectorization

I have some tiff files (2 for example) and a shapefile.
The real format of the tiff files is geoTiff.

I want to get the points inside the shape boundary. Each point should have 4 parameters: geom(coordinates), red, green, infrared (we have tiff files with such info).

At the end of the operation I want to get a vectorized shape with points.

Could you please give me some advice on how can I do that programmatically.
Are there any libs/tools?
It is all in the context of geoserver/postgresql/geomajas framework.

Upd: now I have more information. My tiffs will be one of the Landsat combination: http://gif.berkeley.edu/documents/Landsat%20Band%20Information.pdf

The main question now is: to get RGB channels info in exact point, should I parse image points on RGB,or I can get this info from geoTiffMetadata (there is http://download.deegree.org/deegree3/nightly/core/javadoc/org/deegree/coverage/raster/io/imageio/GeoTiffIIOMetadataAdapter.html ). I didn`t find really useful info while debugging the code and calling the methods of GeoTiffIIOMetadataAdapter.

Best Answer

I was able to solve the issue with geotools java library. Extracting coordinates from either tiff and shapefile, we can get points from each tiff pixel by going over tiff with pixel-size step and checking if this point is inside of shapefile geometry coordinates.

Related Question