[Qgis-user] Placing random points

Thomas Sebastien sebasapp at hotmail.com
Fri Mar 24 03:32:25 PDT 2023


Hi Árni, Andrea, Nyall and Chris,

Thank you very much for your help. I tried all your suggestions and what works best for what I’m trying to achieve is dissolving the polygons and placing random points in layer bounds because not only do the points fall inside the polygons, as Andrea pointed out, but also it lets me pick a minimum distance between the points, which is quite useful for my study.

Again many thanks!

Have a good day,

Sébastien

Le 24 mars 2023 à 09:14, Árni Geirsson via QGIS-User <qgis-user at lists.osgeo.org> a écrit :


How about generating a large number of points into the N polygons, using the tool available, then add an attribute to the points and generate uniform random numbers into the attribute and keep only the n points with the lowest random numbers?

Árni


On Thu, 23 Mar 2023 at 21:55, Andrea Giudiceandrea via QGIS-User <qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>> wrote:
Hi Sebastien,
in addition to the suggestion given by Nyall Dawson, I would suggest you
using the "Random points in layer bounds" algorithm: you just need to
specify the total number of random points to be generated. The resulting
layer will contain the specified number of points and such points will
fall inside the polygons.

It seems to me that the "Random points in extent" algorithm, suggested
by Chris Hermansen, may not be suitable for your needs: while the
resulting layer will contain the specified number of points, such points
will fall inside the extent of the layer containing the polygons, so it
is not guaranteed that such points will actually fall inside the polygons.

Best regards,

Andrea Giudiceandrea
_______________________________________________
QGIS-User mailing list
QGIS-User at lists.osgeo.org<mailto:QGIS-User at lists.osgeo.org>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
QGIS-User mailing list
QGIS-User at lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230324/247feabc/attachment.htm>


More information about the QGIS-User mailing list