Monday, December 22, 2008

How to create a point in the center of a polygon


Centroid is a point in the center of a polygon. Creating centroid for polygon features is quite simple but little lengthy process. In ArcGIS you can do that by 4 steps.


Step 1: Add two blank fields in the attribute table of the polygon feature to store X and Y Coordinates of the Centroid.


Step 2: Populate those fields with X and Y Coordinates of the Centroid using Calculate Geometry tool.


Step 3: Export the populated table.


Step 4: Create a point feature layer using the exported X and Y Coordinates of the Centroid.

I believe most of the users of ArcGIS is familier with steps 1, 3 and 4. I'm providing details about setp 2. Let me know if anybody wants to learn more about the other steps.


Calculating area, length, and other geometric properties (Step 2)


1. Start an edit session. You can make calculations without being in an editing session; however, in that case, there is no way to undo the results.


2. Right-click the layer and click Open Attribute Table. You can only perform geometric calculations on attribute tables.


3. Right-click the field heading for which you want to make a calculation and click Calculate Geometry.


4. Click the geometric property you want to calculate. Different properties are available depending on the type of layer you're using.


5. Click to use either the coordinate system of the data source or the coordinate system of the data frame.


6. Click the units of the output calculations.


7. Optionally, if you have selected records in the table, choose whether to apply the calculations to all records or just the selected ones.


8. Click OK.



Note:

Geometry calculations in ArcGIS are planimetric—in other words, take place in projected space, not spherical or geodesic space. You can only calculate the area, length, or perimeter of features if the coordinate system being used is a projected coordinate system. If the data source uses a geographic coordinate system such as WGS 1984, and is therefore unprojected, you can use the projected coordinate system of the data frame to perform the calculations. Alternately, you can project the data source.

Calculate Geometry works with any numeric or text field. For the most precise results, use a field of type double, with the desired number of decimal places. If you use an integer field, the result will be rounded up to a whole number. If you use a text field you can include unit abbreviation, choose the format, and so on to it is easy to make a ready-to-use field for labeling.

No comments:

 
Locations of visitors to this page