<div dir="ltr"><div>Can you fix this by treating it as a standard non-spatial data de-duplication problem? I.e. use the spatial query to assign a polygon ID to each point, and then keep only a single attribute record for each point.</div><div><br></div><div>Lots of examples of this out there, e.g.</div><div><br></div><div><a href="https://www.sqlshack.com/different-ways-to-sql-delete-duplicate-rows-from-a-sql-table/">https://www.sqlshack.com/different-ways-to-sql-delete-duplicate-rows-from-a-sql-table/</a><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 14, 2022 at 6:52 AM Gustavo Martinez <<a href="mailto:gmpuljak@yahoo.com.ar">gmpuljak@yahoo.com.ar</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hi all,</p>
<p>I am working with fishing vessels positions. I have millions of
points, and when doing some analysis I need to do some
intersections with polygons.</p>
<p>All the database is on EPSG 4326 (Lat Long)<br>
</p>
<p>I've noticed some problems when the points are on the edges of
the polygons. When I use ST_Within I lose the points on the edges,
while when using ST_Intersects those points get counted twice.</p>
<p><br></p></div>
</blockquote></div></div>