-1

Here's what I did:

  1. I created a shapefile (polygon geometry) in ARCMAP (with relevant info in its attribute table).
  2. I converted the shapefile into a raster .tif file.
  3. I managed to extract all the info I needed from ArcMap into spyder (python3). Thus, I have a raster tif image, a dbf file and a csv that I used to extract and store some coordinates.
  4. I converted the tif image into an array,
im = Image.open(tif_filepath)
imarray = np.array(im)

so that I could work with pixel values.

My question: How do I associate each entry of the matrix (imarray) with the real coordinate values, in the respective projection?

For example, I want a function that takes entries i, j and returns x, y, where x and y are well defined coordinates in Arcmap.

1 Answers1

-2

GDAL is best choice for your problem. Not just a raster format. You can add your polygon as shp to python with GDAL. You can find many document with GDAL.

I hope it is helpful for you.

Kaya4938
  • 31
  • 1
  • 6