<div dir="ltr">Hi all,<br><br>I need two intersect two tables with geometry columns.<br><br>I get holes in the resulting geometry (clip1) which I cannot explain and must solve.<br>(white in file <Screenshot from 2015-05-19 10:50:36.png>).<br><br>The geometry tables are testes.inputt and testes.targett (which are samples of two larger tables).<br><br>In my attempts to solve to problem, I tried to clean any topology problems with st_cleangeometry and st_makevalid.<br><br>My code is:<br><br>----------<br>--step1:<br>alter table testes.inputt rename column the_geom to the_geom_old;<br>alter table testes.inputt add column the_geom geometry;<br>update testes.inputt set the_geom = st_cleangeometry(the_geom_old);<br><br>alter table testes.targett rename column the_geom to the_geom_old;<br>alter table testes.targett add column the_geom geometry;<br>update testes.targett set the_geom = st_cleangeometry(the_geom_old);<br><br>----------<br>--step2:<br>alter table testes.inputt rename column the_geom to the_geom_old2;<br>alter table testes.inputt add column the_geom geometry;<br>update testes.inputt set the_geom = ST_MakeValid(the_geom_old2);<br><br>alter table testes.targett rename column the_geom to the_geom_old2;<br>alter table testes.targett add column the_geom geometry;<br>update testes.targett set the_geom = st_cleangeometry(the_geom_old2);<br><br>----------<br>--step3:<br>DROP TABLE if exists testes.clip1;<br>CREATE TABLE testes.clip1 AS<br>SELECT    testes.inputt.ikey, testes.targett.tkey, testes.inputt.iarea,<br>    st_intersection(testes.inputt.the_geom,testes.targett.the_geom) as the_geom<br>FROM testes.inputt, testes.targett<br>WHERE  testes.inputt.the_geom && testes.targett.the_geom<br>    AND st_intersects(testes.inputt.the_geom,testes.targett.the_geom);<br><br>screenshots and data can be found here:<br><a href="https://www.dropbox.com/sh/9h622gj0qrz1cnx/AADHokAeVtnIC__6CAaqBEaia?dl=0">https://www.dropbox.com/sh/9h622gj0qrz1cnx/AADHokAeVtnIC__6CAaqBEaia?dl=0</a><br><br>hope I was clear enough.<br>Thank you in advance.<br>regards,<br>António<br></div>