0

I am a student working on my final year study. It's my first time using ArcGIS. I need to have the coordinates of the polygons that I choose to work on. After converting the zones that I created into a raster, I want to extract the coordinates.

Hornbydd
  • 43,380
  • 5
  • 41
  • 81
Ghita Tazi
  • 13
  • 3

2 Answers2

0

You cannot directly compute the coordinates of a polygon stored as a raster, because pixels of a raster are not aware of the other pixels with this value. As you mentioned that you had to convert your polygons to raster, you should directly work in vector type: open the attribute table, create one field for long and one for lat, then compute the centroid X nd Y with "calculate geometry" after right-clicking on the fields name.

radouxju
  • 49,636
  • 2
  • 71
  • 144
0

There are a couple ways to do this.

  1. If you want centroids, you can convert the raster to a polygon and get the centroids of the dataset
  2. You can convert the raster to a numpy array (https://pro.arcgis.com/en/pro-app/arcpy/functions/rastertonumpyarray-function.htm) and use some simple math to figure out from the raster's origin and the width of the cells the locations you need.

There are a bunch of other ways to do it as well...

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
code base 5000
  • 840
  • 7
  • 17
  • Good evening, I found the solution and it's very simple. I don't need to convert it in raster. I can let it as a vector and get the information. – Ghita Tazi Dec 27 '16 at 21:50
  • This a video on youtube that showed me how to do it: https://www.youtube.com/watch?v=YgIHXi6lxgo Thanks again – Ghita Tazi Dec 27 '16 at 21:52