[QGIS-ZA-user] Polygon Centroids Extraction - New User

Herbert Chitate herbert at talarius.co.zw
Wed Mar 3 22:54:39 PST 2021


Hi Frank,

You are an absolute life saver. Almost there. So I managed to generate the
centroids. Thoroughly impressed for a new user!!!

I have attached a screen shot of the results.

Final question though is how do I extract the lat and lon of the centroids,
into say a csv file with also a column with the cluster number they belong
to (cluster number is what i used to demacate the different polygons in
step 2 of your instructions)

Many many many thanks

Much appreciated

Regards

Herbert

On Mon, Mar 1, 2021 at 2:25 PM Frank Sokolic via qgis-za-user <
qgis-za-user at lists.osgeo.org> wrote:

> Hi Herbert,
>
> I haven't tested it but you could try something like this:
>
> 1) Load the csv file into QGIS using the "Add Delimited Text Layer" tool
> (Shift + Ctrl + T)
> 2) Use the "Minimum bounding geometry" tool to create a polygon around
> each cluster (Processing Toolbox > Vector geometry > Minimum bounding
> geometry)
> 3) Generate centroids for each polygon (Processing Toolbox > Vector
> geometry > Centroids)
>
> Hope this helps.
>
> Regards, Frank.
>
> On 2021/03/01 13:04, Herbert Chitate via qgis-za-user wrote:
>
> Good afternoon All,
>
> I am new to QGIS and was wondering if someone might be able to assist me
> on an extraction I am trying to do.
>
> I have lat and lon details for about 1,500 locations, which using python
> (kmeans), I have clustered the data into 20 clusters of which I have the
> details of the constituent members (+ gps locations) that make up the 20
> clusters. Info now in a CSV file.
>
> How can I use QGIS to establish the lat and lon of the centroids for each
> of the clusters?
>
> Thank you for the assistance.
>
> Regards
>
> Herbert
>
> _______________________________________________
> qgis-za-user mailing listqgis-za-user at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/qgis-za-user
>
>
> _______________________________________________
> qgis-za-user mailing list
> qgis-za-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/qgis-za-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-za-user/attachments/20210304/c6f8c8be/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Centroids Extraction.docx
Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Size: 156025 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-za-user/attachments/20210304/c6f8c8be/attachment-0001.docx>


More information about the qgis-za-user mailing list