<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-forward-container"><br>
<br>
-------- Mensaje reenviado --------
<table class="moz-email-headers-table" cellspacing="0"
cellpadding="0" border="0">
<tbody>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">Asunto:
</th>
<td>Re: [postgis-users] problem with points in polygon edge</td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">Fecha: </th>
<td>Wed, 16 Mar 2022 15:21:31 -0300</td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">De: </th>
<td>Gustavo Martinez <a class="moz-txt-link-rfc2396E" href="mailto:gmpuljak@yahoo.com.ar"><gmpuljak@yahoo.com.ar></a></td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">A: </th>
<td>Greg Troxel <a class="moz-txt-link-rfc2396E" href="mailto:gdt@lexort.com"><gdt@lexort.com></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Hi Greg,</p>
<p>I can't share the database. Attached are 2 shapefiles with the
data of the following example (consider that the queries run on
the server):</p>
<p>- select b.grado, b.cuarto, count(idvms) from
monitoreo.vms_2021 a, datos.cuadricula_05 b where
a.idprts='20215019326' and st_within(a.geom,b.geom) group by
1,2;</p>
<p>Gives:</p>
<p>grado cuarto count<br>
3857 NE 13<br>
3857 NO 49<br>
3857 SO 6<br>
3858 SE 13<br>
3958 NE 16<br>
3958 SO 16<br>
4058 NO 15<br>
4059 NE 3<br>
4059 SE 19<br>
4159 NE 11<br>
4159 NO 6<br>
4159 SO 18<br>
4259 NO 18<br>
4259 SO 10<br>
4260 SE 6<br>
4360 NE 17<br>
4360 SE 14<br>
4459 NO 453<br>
4460 NE 307</p>
<p><br>
</p>
<p>- select b.grado, b.cuarto, count(idvms) from
monitoreo.vms_2021 a, datos.cuadricula_05 b where
a.idprts='20215019326' and st_intersects(a.geom,b.geom) group by
1,2;</p>
<p>Gives:</p>
<p>grado cuarto count<br>
3857 NE 13<br>
3857 NO 49<br>
3857 SO 6<br>
3858 SE 13<br>
3958 NE 16<br>
3958 SO 16<br>
4058 NO 15<br>
4059 NE 3<br>
4059 SE 19<br>
4159 NE 11<br>
4159 NO 6<br>
4159 SO 18<br>
4259 NO 18<br>
4259 SO 10<br>
4260 SE 6<br>
4360 NE 17<br>
4360 SE 14<br>
4459 NO 461<br>
4460 NE 315</p>
<p><br>
</p>
<p>- select b.grado, b.cuarto, count(idvms) from
monitoreo.vms_2021 a, datos.cuadricula_05 b where
a.idprts='20215019326' and monitoreo.dentro(a.geom,b.geom) group
by 1,2;<br>
</p>
<p>Gives:</p>
<p>grado cuarto count<br>
3958 SO 16<br>
4259 NO 18<br>
4059 NE 3<br>
4159 NO 6<br>
4460 NE 315<br>
3857 NE 13<br>
4159 SO 18<br>
3958 NE 16<br>
3857 SO 6<br>
3857 NO 49<br>
4360 NE 17<br>
4260 SE 6<br>
4259 SO 10<br>
4459 NO 453<br>
4058 NO 15<br>
3858 SE 13<br>
4360 SE 14<br>
4059 SE 19<br>
4159 NE 11</p>
<p><br>
</p>
<p>- select count(idvms) from monitoreo.vms_2021 where
idprts='20215019326'</p>
<p>Gives:</p>
<p>count<br>
1018<br>
</p>
<p>You can see that st_intersects adds points and st_within gives
a lower count that the real one.<br>
</p>
<p><br>
</p>
<p>El 16/3/22 a las 14:30, Greg Troxel escribió:</p>
<blockquote type="cite" cite="mid:rmi35jhpzyb.fsf@s1.lexort.com">
<pre class="moz-quote-pre" wrap="">You still haven't explained what you are trying to do, and haven't
posted your queries. That's ok, but I have not further useful
suggestions for you.
</pre>
</blockquote>
<div class="moz-signature">-- <br>
<p><font face="monospace"><font style="font-size: 14pt" size="4"><b>Gustavo
Martínez Puljak</b></font></font></p>
<p style="margin-bottom: 0cm"><font style="font-size: 14pt"
size="4"><b><br>
</b></font><font style="font-size: 10pt" size="2">cel: +549
11 64089000</font><br>
<font face="monospace"><font style="font-size: 10pt" size="2">Linkedin:<a
href="https://www.linkedin.com/in/gustavomartinezpuljak"
moz-do-not-send="true">www.linkedin.com/in/gustavomartinezpuljak</a></font></font></p>
<p><b><br>
</b><font face="monospace"><font style="font-size: 10pt"
size="2"><i>Que la tierra se vaya haciendo camino ante tus
pasos,</i></font></font><font style="font-size: 10pt"
size="2"><i><br>
</i></font><font face="monospace"><font style="font-size:
10pt" size="2"><i>que el viento sople siempre a tus
espaldas,</i></font></font><font style="font-size: 10pt"
size="2"><i><br>
</i></font><font face="monospace"><font style="font-size:
10pt" size="2"><i>que el sol brille cálido sobre tu cara,</i></font></font><font
style="font-size: 10pt" size="2"><i><br>
</i></font><font face="monospace"><font style="font-size:
10pt" size="2"><i>que la lluvia caiga suavemente sobre tus
campos y,</i></font></font><font style="font-size: 10pt"
size="2"><i><br>
</i></font><font face="monospace"><font style="font-size:
10pt" size="2"><i>hasta tanto volvamos a encontrarnos,</i></font></font><font
style="font-size: 10pt" size="2"><i><br>
</i></font><font face="monospace"><font style="font-size:
10pt" size="2"><i>que Dios te lleve en la palma de su
mano.</i></font></font></p>
<p><br>
<br>
</p>
</div>
</div>
</body>
</html>