用ArcGis怎样找出Polygon的中心点坐标,并在图中画出?

来源:百度知道 编辑:UC知道 时间:2024/06/01 01:09:23
如题

使用field calculation。下面是arcgis help里的讲解:

Adding the x,y coordinates of the centroid of a polygon layer to a new field

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.
Open the attribute table of the layer of the layer you want to edit.
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).
Click Calculate Values.
Check Advanced.
Type the following VBA statement in the first text box.
Dim dblX As DoubleDim pArea As IAreaSet pArea = [Shape]dblX = pArea.Centroid.X
Type the variable dblX in the text box directly under the X field name.
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
The property