Monday 20 November 2017

Displaying multipoint features as polygon using QGIS?


Is there an easy way to show/connect a group of points on a multipoint shapefile layer as if they were a polygon?


I'm collecting points for a plant study, and some of the points are gathered as a patch of plants. I'd like to symbolize individual plants and patches differently.



Answer



Given a multipoint layer like you describe, with some features as individual points, and some as multipoint, we can derive polygons for the patches in a couple steps, which could easily be combined into a custom model.


Note: this process assumes you have some sort of unique id field for your features.


Here's my points layer, color-coded to the feature ID to help show the multipoint patch in the center.


points layer with multipatch in center





  1. Run Multipart to single parts in the Vector geometry toolbox.




  2. Run Minimum bounding geometry, also in the Vector geometry toolbox.



    • Set Field parameter to unique_id

    • Set Geometry type to Convex Hull





For all features that were already single points, there will not be enough points to generate a convex hull. For your multipoint patches, you'll get results like these:


multipatch to polygon


That's it!


A model of the same would look like this:


points to patches model


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...