Sometimes I get self-intersection problems when projecting data into 2d, it was valid in spherical but becomes self-intersecting in a 2d projection. To see where the problems are run:<br><br>select gid from sometable where ST_IsValid(geometry) = 'F';<br>
<br>If that shows any rows, then I run:<br><br>update sometable set geometry = ST_MakeValid(geometry) where ST_IsValid(geometry) = 'F'<br><br><div class="gmail_quote">On Sat, Nov 26, 2011 at 11:46 AM, Bob and Deb <span dir="ltr"><<a href="mailto:bobdebm@gmail.com">bobdebm@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><p>I notice with some self-intersecting polygons, st_buffer() with distance of 0 can make polygons disappear.</p>
<p>-Bob</p><div><div></div><div class="h5">
<div class="gmail_quote">On Nov 26, 2011 2:26 AM, "Sandro Santilli" <<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sat, Nov 26, 2011 at 09:35:47AM +0200, ahmet temiz wrote:<br>
<br>
> Could you give me an idea to solve this problem ?<br>
><br>
> "Ring Self-intersection at or near point 39.0002 37.8181"<br>
<br>
Try passing the geoms under st_buffer() with a distance of 0.<br>
Alternatively, if you can, use ST_MakeValid() found in PostGIS-2.0.<br>
<br>
If you feel adventurous you could build a standard topology and<br>
clean from there. See:<br>
<a href="http://strk.keybit.net/blog/2011/11/21/topology-cleaning-with-postgis/" target="_blank">http://strk.keybit.net/blog/2011/11/21/topology-cleaning-with-postgis/</a><br>
<br>
--strk;<br>
<br>
() Free GIS & Flash consultant/developer<br>
/\ <a href="http://strk.keybit.net/services.html" target="_blank">http://strk.keybit.net/services.html</a><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br>