[postgis-users] Sample - Points into Polygons

Vispo Leblanc vispoleblanc at gmail.com
Fri May 25 14:25:39 PDT 2018

Hello PostGIS users,

I have one table with thousand of polygons and another one with million of
points. I would like to select all the points that are within the polygons,
BUT I just want a sample of the data. Let me explain.

Let’s say I have a polygon of 1,000 square meter with 60 points, ideally I
would like to take only 1 points. But if the polygon is 10,000 square meter
with 600 points then ideally I would take only 10 points. Also, in a
perfect world, I would only select a sample of points that are spread out
enough to be representative of the polygons. Let’s take the 10,000 square
meters polygon for example, I would only select 10 points that are
everywhere in the polygon and not 10 points that are within 10 meters of
each other’s.

I draw the following diagram to explain:

[image: image.png]

Please let me know if you have any ideas or functions I can use to solve my

Thank you :-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20180525/da78c6c4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 56937 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20180525/da78c6c4/attachment.png>

More information about the postgis-users mailing list