XTools Website

 

Convert Shapes to Centroids

 

 

Purpose

 

The tool creates a new point feature class from the centroids of the shapes in the input feature layer.   

 

Description

 

Layers of any geometry type are supported for converting to centroids:

- For polygon layers in addition to the center point a label point can also be derived (in this case centroid is always placed within a polygon).

- For polyline layers FROM and TO points are available in addition to the center point.

- For multipoint layers both the center point and the nearest to center real point are the options.

- Besides, points and any other features can be grouped by one or a few attribute fields. Centroids can be created for groups of features in this case.

 

Resulting centroids feature class can be stored in a new shapefile or geodatabase feature class. Attributes from the source layer are transferred to the output points layer (for centroids made for groups of features only the group field is kept).

 

Examples of when the tool can be used:

 

  • Use it to represent two properties of the same shapefile at the same time. Use the input layer legend to represent the first property while the legend of the new centroid point layer will represent a second property using the transferred attributes.

 

  • Use it in special cases of spatial joins (shapefield to shapefield joins). Suppose you have two polygon shapefiles A and B. You want to transfer attributes of A to B. Of course, you could do something like an overlay, but sometimes this is undesirable. Also, there are no unique identifiers identical for two layers on which you could make a normal join. So how this task can be accomplished? Here is one of the approaches: create a centroid layer from B, then create a spatial join with A. Now the data from the polygons from A may be joined to the centroid shapefile (you cannot perform a spatial join in case when the data from points were transferred to polygons, because there might be more than one point inside one polygon). Since you have the unique identifiers from B in your centroid layer, you can now join the centroid layer to the layer table of B. Data transferred!

 

Usage

 

  1. Select the "Shapes to Centroids" tool from the XTools Pro Feature Conversions menu.  

  2. Select the input layer containing features that you wish to convert to centroids.

  3. Specify the name and location of the output centroids feature class.

  4. Select one or a few fields to group input features if you wish to create centroids for groups of features.

  5. If centroids are created for groups of features you can select to weight centroids by an attribute (numeric fields supported).

  6. Select centroid location, this can be:

for points - Center point

for multipoints - Center point, Nearest to center point

for polylines - Center point, From point, To point

for polygons - Center point, Label point

for grouped features - Center point

  1. Press Run to convert shapes to centroids.

 

 

 

---

 

Table of Contents

-Search-

Back