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.
Asked
Active
Viewed 801 times
0
-
I need the latitude and longitude of each polygone (maybe there center) – Ghita Tazi Dec 22 '16 at 11:51
2 Answers
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.
- If you want centroids, you can convert the raster to a polygon and get the centroids of the dataset
- 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