[postgis-users] problems cleaning geometry - other options?

Kevin Neufeld kneufeld at refractions.net
Thu Dec 4 08:53:08 PST 2008


Correct.  I assumed in your case that the rings do not need to be noded against eachother (that's what st_union is for), 
they just need to be sorted to determine the outer and inner rings (that's a task for BuildArea).
Glad it works.
-- Kevin

William Kyngesburye wrote:
> That works.  It looks essentially the same as what's in the 
> cleangeometry function from the wiki, but much simpler.  There's 
> st_union and st_multi in there betwen the buildarea and boundary 
> functions, probably to handle other invalid stuff.
> 
> On Dec 4, 2008, at 1:02 AM, Kevin Neufeld wrote:
> 
>> Have you tried updating the geometry with a new polygonized polygon 
>> constructed from the linework?
>>
>> UPDATE swbd
>> SET wkb_geometry = ST_BuildArea(ST_Boundary(wkb_geometry))
>> WHERE cell = 145018 AND wb = 353;
>>
>> Cheers,
>> -- Kevin
> 
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
> 
> First Pogril: Why is life like sticking your head in a bucket filled 
> with hyena offal?
> Second Pogril: I don't know.  Why IS life like sticking your head in a 
> bucket filled with hyena offal?
> First Pogril: I don't know either.  Wretched, isn't it?
> 
> -HitchHiker's Guide to the Galaxy
> 
> 



More information about the postgis-users mailing list