1

I want to create a data frame in R combining the bands wth the shapefile. The final file will have the pixels as rows, the bands as well as the other columns from the attribute table from the shapefile.

I want a csv table where the columns are the Landsat bands (say band 2, 3 and 4) along with other columns that are there in the attribute table of the shapefile (Country, State, Village name, Lat, Long etc)

csk
  • 24,827
  • 3
  • 32
  • 70
Bappaditya
  • 11
  • 1
  • 3
    I don't really understand. You mention bands and pixels, terms that belong to me in raster format. And after, you mention attribute table, and this one belong to shapefile (and other vector) format. Can you be more clear on what do you want to achieve ? – J. Monticolo May 23 '19 at 09:45
  • Dear Monticolo...this is what I want. A csv table where the columns are the Lansdat bands (say band 2,3 and 4) along with other columns that are there in the attribute table of the shapefile (Country, State, Village name, Lat, Long etc) – Bappaditya May 23 '19 at 10:13
  • Please [Edit] the question in response to requests for clarification. It's not fair to those who would help to need to mine the comments for critical information. – Vince May 23 '19 at 10:30
  • The lidar data in the marked "duplicate" are point features that are directly comparable to your question. In the future, please carefully search the site as, it is very likely that your question has already been addressed. – Jeffrey Evans May 23 '19 at 18:09

1 Answers1

0

Depend on how large your raster it, you could convert the raster to points, then spatial join the new created point-shapefile with the input shapefile to get the attribute information. Finally use extract multi values to points to get the information from the bands.

You could do the procedure above with ESRI ArcMap. It should be however doable in QGIS as well.

PDUY
  • 43
  • 5