2.2.6. Point inside polygon coordinates

Calculate coorinates of a point guaranteed to be inside a polygon and add the calculated coordinates to point_X, point_Y attributes. PointOnSurface method.

Inputs:

  • Polygon vector layer in one of the formats, supported by GDAL, e.g. Shapefile in ZIP-archive, GeoJSON, GeoPackage.

Outputs:

  • ZIP with polygonal shapefile with two fields added: point_X, point_Y

../../_images/point_on_surface.png

Pic. 2.3. Visualization of the calculated centroids

../../_images/centroid2attr_en.png

Pic. 2.4. Resulting feature table of the layer with added attributes

Launch tool: https://toolbox.nextgis.com/operation/centroid2attr

Try it out using our sample:

Download input dataset to test the instrument. Step-by-step instructions included.

Get the output to additionally check the results.