概述
获取polygon的中心点坐标
使用field calculation。下面是arcgis help里的讲解:
Adding the x,y coordinates of the centroid of a polygon layer to a new field
1. Optionally, start an edit session in ArcMap. Calculating a field is faster outside of an edit session, but you won't be able to undo the calculation.
2. Open the attribute table of the layer of the layer you want to edit.
3. Right-click the field heading for the X field (if there is no X field you can add a new field by clicking the options button and selecting the new field option).
4. Click Calculate Values.
5. Check Advanced.
6. Type the following VBA statement in the first text box.
Dim dblX As DoubleDim pArea As IAreaSet pArea = [Shape]dblX = pArea.Centroid.X
7. Type the variable dblX in the text box directly under the X field name.
8. Click OK.
You can repeat the same process for updating a field with the Y coordinates for the centroid point of each polygon in the layer.
Tip
中国3S吧 3s8.cn
• The property X returns a field type of double. For best results, your X field should also be a double field type.
最后
以上就是欣喜短靴为你收集整理的获取ARCGIS中polygon的中心点坐标的全部内容,希望文章能够帮你解决获取ARCGIS中polygon的中心点坐标所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复