## Smart M.App discussions

Looking for answers in regards to M.Apps, M.App Exchange or M.App Studio? Smart M.App Tech Discussion board is where you can search, ask your questions and assist others by sharing your knowledge. Join the conversation, connect, contribute and share.
Showing results for
Do you mean
Highlighted
Occasional Contributor
Posts: 7
Registered: ‎08-17-2016

# Creating centroids from polydons in Smart M.App spatial Modeller

Hi,

Please assist me to create a spatial recipe in Smart M.App which creates centroids (a new point dataset) from polygons (shapefiles) in Spatial Modeller.

CJ

Highlighted
Staff
Posts: 14
Registered: ‎07-11-2016

## Re: Creating centroids from polydons in Smart M.App spatial Modeller

Currently there is an operator that will be able to get the center of the polygon (Measure Center) as attributes but there is not a way to convert that into a points dataset.

The center is the coordinate average of all the vertices inside the feature geometry.

But this workflow is part of our roadmap for future releases.

Regards,

Highlighted
Occasional Contributor
Posts: 7
Registered: ‎08-17-2016

## Re: Creating centroids from polydons in Smart M.App spatial Modeller

Thank you

Highlighted
Technical Evangelist
Posts: 945
Registered: ‎10-01-2015

## Re: Creating centroids from polydons in Smart M.App spatial Modeller

Hi Kumar,

Wont the Create Geometry from Attributes operator take the results of Measure Center and convert them to Point geometries?

Cheers

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Highlighted
Technical Evangelist
Posts: 642
Registered: ‎02-02-2016

## Re: Creating centroids from polydons in Smart M.App spatial Modeller

[ Edited ]

As Ian suggested you can use the Measure Center operator and the Create Geometry From Attributes operator to create a new feature dataset of points representing the centers of the input polygons. These points may not be true centroids - they are the average of all the vertices of the polygon.

Kind regards,

Stephen Bent

Hexagon Geospatial Support

Highlighted
Occasional Contributor
Posts: 7
Registered: ‎08-17-2016

## Re: Creating centroids from polydons in Smart M.App spatial Modeller

Thanks let me give it a try

Highlighted
Technical Evangelist
Posts: 642
Registered: ‎02-02-2016

## Re: Creating centroids from polydons in Smart M.App spatial Modeller

[ Edited ]

Hi CJ,

Your question about creating raster images from contours and point datasets has been moved to a new thread (linked below). Please feel free to edit the subject/title.

Link to new discussion topic.

Regards,

Stephen Bent

Hexagon Geospatial Support