<div dir="ltr"><div><div><div><div>Hey,<br></div>just a trick I uses to make sure everything will work :<br><br></div>_first check befor that every geom is valid, as a length/area, etc etc<br></div>_second if you can node your geom before going ot topology<br>
<br></div><div>_when converting to topogeom, uses an order by on your data.<br></div><div>_you can modify to topogeom function to add an exception catcher and another output (a boolean saying if the conversion worked)<br>
_This way you launch conversion on everything and keep the result, then you relaunch on errors, and hopefully it will work because the topology is already containing something.<br><br>Yes this is less than clean, but it works for me ...<br>
</div><div><br></div><div>Now if you have very serious problem: go grass 7, then with 2 command line you simultaneously import your data into grass and push it to postgis topology. IF this doesn't work you need a third command line to clean your topology with grass.<br>
</div><div>I did it it is easy<br><br><br></div><div><br>Cheers,<br>Rémi-C <br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-08 7:53 GMT+02:00 Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Mon, Jul 07, 2014 at 05:21:16PM -0300, Adrien ANDRÉ wrote:<br>
> Thank you, updating PostGIS to 2.2.0dev solved the "shell must be<br>
> closed" errors.<br>
><br>
> Now "faces mismatch" are dominant :<br>
><br>
> 123 faces mismatch: invalid topology ?<br>
> 22 SQL/MM Spatial exception - geometry crosses edge<br>
> 2 Edge changed disposition around end node<br>
> 1 SQL/MM Spatial exception - geometry crosses a node<br>
> 1 Spatial exception - geometry intersects edge<br>
> 1 Edge changed disposition around start node<br>
><br>
><br>
> How do i understand them ?<br>
<br>
</div>You read the code:<br>
<a href="https://github.com/postgis/postgis/blob/2.1.3/topology/sql/sqlmm.sql.in#L3553-L3563" target="_blank">https://github.com/postgis/postgis/blob/2.1.3/topology/sql/sqlmm.sql.in#L3553-L3563</a><br>
<br>
It seems to be a sign of invalid topology being constructed by previous<br>
steps, so what you could do is have your population routing stop at<br>
the very first occurrence of any of those errors and check the validity<br>
of the topology constructed so far, using ValidateTopology.<br>
<br>
Make sure to be running the latest GEOS release, which should also help with<br>
some of those issues. Then, as usual, try to find the smallest set of<br>
operations that can take you from an empty topology to an invalid topology<br>
by only using the toTopoGeom function.<br>
<br>
NOTE: order of toTopoGeom calls can change the results.<br>
NOTE2: tolerance specified can change the results.<br>
<div class="HOEnZb"><div class="h5"><br>
--strk;<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div>