[postgis-users] unioning a buffer - bug?

Lee quimby5 at yahoo.com
Tue Sep 14 06:03:55 PDT 2010


Hi Kevin,

I assumed I have no results because when I load one of the working queries as a 
view (eg. select st_buffer(the_geom,0.1)) in QGIS, or in ArcGIS, I see all my 
results as I would expect, but when I modify the query to st_union(st_buffer()), 
all my parcels disappear and I have a blank canvas.

Also, with st_isvalid(st_union(st_buffer(the_geom,0.1))) returning null (neither 
t nor f) I guess I just assumed.  Anyways, results for your suggestions are 
inline, below.  



Thanks for your help. Any further ideas?

Lee.


________________________________
From: Kevin Neufeld <kneufeld at refractions.net>
To: postgis-users at postgis.refractions.net
Sent: Tue, September 14, 2010 12:12:46 AM
Subject: Re: [postgis-users] unioning a buffer - bug?

How are you determining you have no results?  

Try:
CREATE TABLE results AS
SELECT st_union(st_buffer(the_geom,0.1)) as the_geom 
FROM base.current_assessment_parcel;

NOTICE:  TopologyException: found non-noded intersection between 586714 
4.95189e+006, 586714 4.95189e+006 and 586714 4.95189e+006, 586739 4.9519e+006 
586714 4.95189e+006
Query returned successfully with no result in 1078 ms.



SELECT count(*) FROM results;

1

SELECT ST_Summary(the_geom) FROM results;

This returns blank.


(snip)

-- Kevin

On 9/13/2010 7:07 AM, Lee wrote: 
So after some googling I see similar problems, but no solutions posted.
>
>I am trying to union a buffer, but the query is returning no results.  Here is 
>ultimately what I would like to achieve:
>
>select st_union(st_buffer(the_geom,0.1)) as the_geom from 
>base.current_assessment_parcel
>
>Here are some troubleshooting steps I have taken to try narrow it down:
>
>select st_isvalid(the_geom) a from base.current_assessment_parcel group by a
>TRUE
>
>select st_isvalid(st_buffer(the_geom,0.1)) a from base.current_assessment_parcel 
>group by a
>TRUE
>
>select st_isvalid(st_union(the_geom)) from base.current_assessment_parcel
>TRUE
>
>select st_isvalid(st_union(st_buffer(the_geom,0.1))) from 
>base.current_assessment_parcel
>NOTICE:  TopologyException: found non-noded intersection between 586714 
>4.95189e+006, 586714 4.95189e+006 and 586714 4.95189e+006, 586739 4.9519e+006 
>586714 4.95189e+006
>Total query runtime: 859 ms.
>1 row retrieved.
>(returns blank record)
>
>
> And just for fun
>select st_isvalid(st_buffer(st_union(the_geom),0.1)) a from 
>base.current_assessment_parcel
>TRUE
>
> 
>I guess my next step would be to try the snap to grid functions, but the first 
>query above should work, shouldn't it?
>
>Any help appreciated. Thanks.
>Lee
>
> _______________________________________________ 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/20100914/5fa0e5c8/attachment.html>


More information about the postgis-users mailing list