[postgis-users] Ring Self-intersection problem

Josh Jordan joshjordan at robotjosh.com
Sat Nov 26 10:10:59 PST 2011


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:

select gid from sometable where ST_IsValid(geometry) = 'F';

If that shows any rows, then I run:

update sometable set geometry = ST_MakeValid(geometry) where
ST_IsValid(geometry) = 'F'

On Sat, Nov 26, 2011 at 11:46 AM, Bob and Deb <bobdebm at gmail.com> wrote:

> I notice with some self-intersecting polygons, st_buffer() with distance
> of 0 can make polygons disappear.
>
> -Bob
> On Nov 26, 2011 2:26 AM, "Sandro Santilli" <strk at keybit.net> wrote:
>
>> On Sat, Nov 26, 2011 at 09:35:47AM +0200, ahmet temiz wrote:
>>
>> > Could you give me an idea to solve  this problem ?
>> >
>> > "Ring Self-intersection at or near point 39.0002 37.8181"
>>
>> Try passing the geoms under st_buffer() with a distance of 0.
>> Alternatively, if you can, use ST_MakeValid() found in PostGIS-2.0.
>>
>> If you feel adventurous you could build a standard topology and
>> clean from there. See:
>> http://strk.keybit.net/blog/2011/11/21/topology-cleaning-with-postgis/
>>
>> --strk;
>>
>>  ()   Free GIS & Flash consultant/developer
>>  /\   http://strk.keybit.net/services.html
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20111126/d378cc7d/attachment.html>


More information about the postgis-users mailing list