You are here: Menu Commands > File tools > Create centroids from polygons
GEOVIA Surpac

Create centroids from polygons

This function allows you to create strings from the computed centroids of the segments of a string.

To run this function: Choose File tools > Create centroids from polygons, or...

  • In the Function Chooser, type CENTROIDS FROM SEGMENTS, and press ENTER.

For each string in the input file, the centroid point of each segment is computed and written to the output file. The number of points in the output strings is equal to the number of segments in the input strings.

Note: The segments in the input file must be closed.

Location and ID Range

Enter the Location and ID range of the files to be processed.

Mean of Description Fields

Enter 'Y', if you wish the description field of the centroid points to contain the mean of the description fields of the points for that segment in the input file. This is only suitable for numeric fields.

If you answer `N', then the description field will contain the description field of the first point of the segment in the input file.

Output Location

Enter the output file Location. The ID number will be the same as for the input file.

Result

The true centroid point (not the mean point) of each segment are computed. This ensures that the computed value will not be weighted by the distribution of points in each segment.

The following rules apply to the output files

  • Number of output strings = Number of input strings
  • Output string numbers = Input string numbers
  • Number of points per output string = Number of segments per input string