8

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.

2
  • The relation between the image (TIFF) files and the shapefile: shape boundary is situated "inside" the tiff files. The distance between points should be 5-10 meters.
    – gis_wild
    Commented May 30, 2012 at 21:48
  • 2
    As far as I understand your workflow: 1. Merge rasters 2. Convert your rasters to point features with preserved attributes (x, y, z, R, G, B, I) 3. Extract points within the area of interest (your shape file). I do not know procedure in programs listed by you, but may help in ESRI world.
    – Tomek
    Commented May 31, 2012 at 12:25

1 Answer 1

1

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.

1
  • 1
    Hi. Could you please show an example code of how you get data from each pixel using GeoTools?
    – Rodrigo
    Commented Oct 1, 2017 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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