I have 354 distinct points (as a shapefile) that are very close together i.e. 2-3 points have the same lat but different long or vice versa as the sampling was done in a very small area and the field conditions were difficult.

I have imported this points shapefile as a new vector and have checked the attributes to see if the points have distinct lat & long (together). I have then exported the vector layer into roi and then exported the roi into an ASCII sampling the RGB bands.

Ultimately, I get 354 points having duplicate lat long and there are only 37 distinct points, instead of 354. Are the points too close to be treating each point as a distinct roi?

If yes, then how do I extract the spectral values at these points. (Exporting to Arcmap and sampling is not an option)

  • I am not familiar with this exact method but it sounds as though multiple points are contained within one pixel and so only one value is exported. Depending on how close together your points are and how large your image is, you could resample your image to a finer resolution. Whilst this would achieve your goal it is probably not the most optimal solution
    – GeoMonkey
    Oct 14, 2016 at 0:18

1 Answer 1


You can create a unique ID for each point in the shapefile to preserve their number of 354 point and use that ID to convert the vector data into ROI. The following I quoted from Convert Vectors to ROIs help:

If unique records are saved in the shapefile, select Unique records of an attribute to separate ROIs to convert vector records of an attribute type to separate layers. For example, vectors with a CLASS_ID of 0 are grouped in one ROI, vectors with a CLASS_ID of 1 are grouped in another ROI, and so forth. Select the Attribute to use from the drop-down list that appears.

Another option to extract the values of RGB raster data into point shapefile, if you don't have Spatial Analyst, is to use QGIS Point sampling tool. Using Point sampling tool you can extract the values of the raster pixels under each point to use it into your analysis. You can extract the pixel values of several raster data at the same time, but make sure that the raster data and the point shapefile have the same projection. If the raster data and point shapefile have different projections, the output point shapefile will have empty fields for the values of raster data.

Your Answer

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

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