<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi Lee,<br>
    <br>
    Unfortunately, I can't duplicate your error.  I can
    st_union(st_buffer(geom, 0.1)) no problem ...<br>
    <tt>POLYGON ((<br>
              586801.773149238 4951692.01936019, <br>
              586801.773148314 4951692.01935961, <br>
              586773.455669237 4951674.0093102, <br>
              ....</tt><br>
    <br>
    What version of GEOS are you running? As I've said, it works fine
    for me running 3.2.2.  Perhaps you need to upgrade?<br>
    <br>
    Cheers,<br>
    Kevin<br>
    <br>
    On 9/15/2010 12:09 PM, Lee wrote:
    <blockquote cite="mid:607100.83077.qm@web53505.mail.re2.yahoo.com"
      type="cite">
      <style type="text/css"><!-- DIV {margin:0px;} --></style>
      <div style="font-family: garamond,new york,times,serif; font-size:
        12pt;">okay so I plotted those points that were in the topology
        exception error, and narrowed it down to two adjacent polygons. 
        So now I have:<br>
        select st_union(st_buffer(the_geom,0.1)) from
        base.current_assessment_parcel where gid in (36,37)<br>
        (returns the topology exception)<br>
        <br>
        Checking out those two parcels, they seem legit in qgis /
        arcview. (no weird nodes that I can see).  <br>
        <br>
        Attached is the output from the following query: select gid,
        st_asewkt(the_geom) from base.current_assessment_parcel where
        gid in (36,37) <br>
        I'm relatively newbie to postgis, so can't see what might be
        causing this, if someone could look at this for me?<br>
        <div> </div>
        unfortunately, I am on vacation starting tonight, and won't be
        available to provide further details. If the answer is "your
        polygons are just messed up" then so be it. These are from
        someone elses shapefile. Just want to help if this is indeed a
        bug.<br>
        <br>
        Thanks for your help Kevin.<br>
        Lee.<br>
        <div><br>
        </div>
        <div style="font-family: garamond,new york,times,serif;
          font-size: 12pt;"><br>
          <div style="font-family: times new roman,new york,times,serif;
            font-size: 12pt;"><font size="2" face="Tahoma">
              <hr size="1"><b><span style="font-weight: bold;">From:</span></b>
              Kevin Neufeld <a class="moz-txt-link-rfc2396E" href="mailto:kneufeld@refractions.net"><kneufeld@refractions.net></a><br>
              <b><span style="font-weight: bold;">To:</span></b> PostGIS
              Users Discussion
              <a class="moz-txt-link-rfc2396E" href="mailto:postgis-users@postgis.refractions.net"><postgis-users@postgis.refractions.net></a><br>
              <b><span style="font-weight: bold;">Sent:</span></b> Tue,
              September 14, 2010 10:49:25 PM<br>
              <b><span style="font-weight: bold;">Subject:</span></b>
              Re: [postgis-users] unioning a buffer - bug?<br>
            </font><br>
            Interesting.  Something sure sounds amiss.  Are the results
            null?  Is
            there anything usual occurring at the TopologyException
            location?  Is
            your dataset large?  Can you winnow it down to the few
            polygons that
            might be causing the problem (this may be just the polygons
            around the
            TopologyException location)?  If so, you could paste the
            representation
            of the geometries in PasteBin or something so we can help
            you isolate
            the problem.<br>
            <br>
            Also, what version of GEOS do you have installed?<br>
            SELECT PostGIS_Full_Version();<br>
            <br>
            Cheers,<br>
            Kevin<br>
            <br>
            On 9/14/2010 6:03 AM, Lee wrote:
            <blockquote type="cite">
              <div style="font-family: garamond,new york,times,serif;
                font-size: 12pt;">Hi
                Kevin,<br>
                <br>
                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.<br>
                <br>
                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.  <br>
                <br>
                <div style="font-family: garamond,new york,times,serif;
                  font-size: 12pt;">Thanks
                  for your help. Any further ideas?<br>
                  <br>
                  Lee.<br>
                  <div style="font-family: times new roman,new
                    york,times,serif; font-size: 12pt;"><font size="2"
                      face="Tahoma">
                      <hr size="1"><b><span style="font-weight: bold;">From:</span></b>
                      Kevin Neufeld <a moz-do-not-send="true"
                        rel="nofollow" class="moz-txt-link-rfc2396E"
                        ymailto="mailto:kneufeld@refractions.net"
                        target="_blank"
                        href="mailto:kneufeld@refractions.net"><kneufeld@refractions.net></a><br>
                      <b><span style="font-weight: bold;">To:</span></b>
                      <a moz-do-not-send="true" rel="nofollow"
                        class="moz-txt-link-abbreviated"
                        ymailto="mailto:postgis-users@postgis.refractions.net"
                        target="_blank"
                        href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
                      <b><span style="font-weight: bold;">Sent:</span></b>
                      Tue, September
                      14, 2010 12:12:46 AM<br>
                      <b><span style="font-weight: bold;">Subject:</span></b>
                      Re:
                      [postgis-users] unioning a buffer - bug?<br>
                    </font><br>
                    How are you determining you have no results?  <br>
                    <br>
                    Try:<br>
                    <tt>CREATE TABLE results AS<br>
                      SELECT st_union(st_buffer(the_geom,0.1)) as
                      the_geom <br>
                      FROM base.current_assessment_parcel;<br>
                      <br>
                      <span style="font-weight: bold; color: rgb(127, 0,
                        63);">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</span><br
                        style="font-weight: bold; color: rgb(127, 0,
                        63);">
                      <span style="font-weight: bold; color: rgb(127, 0,
                        63);">Query
                        returned successfully with no result in 1078 ms.</span><br>
                      <br>
                      <br>
                      <br>
                      SELECT count(*) FROM results;<br>
                      <br>
                      <span style="font-weight: bold; color: rgb(127, 0,
                        63);">1</span><br>
                      <br>
                      SELECT ST_Summary(the_geom) FROM results;</tt><br>
                    <br>
                    <span style="color: rgb(127, 0, 63);">This returns
                      blank.</span><br>
                    <br>
                    <span style="font-family: monospace;"><br>
                      (snip)<br>
                    </span><br>
                    -- Kevin<br>
                    <br>
                    On 9/13/2010 7:07 AM, Lee wrote:
                    <blockquote type="cite">
                      <div style="font-family: garamond,new
                        york,times,serif; font-size: 10pt; color: rgb(3,
                        61, 33);"><font size="3"><span
                            style="font-weight: bold;">So after some
                            googling I see
                            similar problems, but no solutions posted.</span><br
                            style="font-weight: bold;">
                          <br style="font-weight: bold;">
                          <span style="font-weight: bold;">I am trying
                            to union a buffer, but
                            the query is returning no results.  Here is
                            ultimately what I would
                            like to achieve:</span></font><br>
                        <br>
                        <span style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0); font-weight: bold;">select
st_union(st_buffer(the_geom,0.1))
as
                          the_geom from
                          base.current_assessment_parcel</span><br>
                        <br>
                        <font size="3"><span style="font-weight: bold;">Here
                            are some
                            troubleshooting steps I have taken to try
                            narrow it down:</span></font><br>
                        <br style="color: rgb(0, 0, 0);">
                        <span style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">select
                          st_isvalid(the_geom)
                          a from base.current_assessment_parcel group by
                          a</span><br style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">
                        <span style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">TRUE</span><br
                          style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">
                        <br style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">
                        <span style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">select
                          st_isvalid(st_buffer(the_geom,0.1))
                          a from
                          base.current_assessment_parcel group by a</span><br
                          style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">
                        <span style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">TRUE</span><br
                          style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">
                        <br style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">
                        <span style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">select
                          st_isvalid(st_union(the_geom))
                          from base.current_assessment_parcel</span><br
                          style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">
                        <span style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">TRUE</span><br
                          style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">
                        <br style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">
                        <span style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">select
                          st_isvalid(st_union(st_buffer(the_geom,0.1)))
                          from
                          base.current_assessment_parcel</span><br
                          style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">
                        <span style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">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</span><br
                          style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">
                        <span style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">Total
                          query
                          runtime: 859 ms.</span><br style="font-family:
                          Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">
                        <span style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;
                          color: rgb(0, 0, 0);">1
                          row
                          retrieved.</span><br style="font-family:
                          Courier
                          New,courier,monaco,monospace,sans-serif;">
                        <font size="3"><span style="font-weight: bold;">(returns
                            blank
                            record)</span></font><br>
                        <br style="font-family: garamond,new
                          york,times,serif;">
                        <div style="font-family: Courier
                          New,courier,monaco,monospace,sans-serif;"><font
                            size="3"><span style="font-family:
                              garamond,new york,times,serif;
                              font-weight: bold;"> And
                              just
                              for fun</span></font><br>
                          <span style="color: rgb(0, 0, 0);">select
                            st_isvalid(st_buffer(st_union(the_geom),0.1))
                            a from
                            base.current_assessment_parcel</span><br
                            style="color: rgb(0, 0, 0);">
                          <span style="color: rgb(0, 0, 0);">TRUE</span><br
                            style="color: rgb(0, 0, 0);">
                        </div>
                        <font size="3"><br style="font-family: Courier
                            New,courier,monaco,monospace,sans-serif;
                            font-weight: bold;">
                        </font>
                        <div><font size="3"><span style="font-weight:
                              bold;">I guess my
                              next
                              step would be to try the snap to grid
                              functions, but the first query
                              above should work, shouldn't it?</span><br
                              style="font-weight: bold;">
                            <br style="font-weight: bold;">
                            <span style="font-weight: bold;">Any help
                              appreciated. Thanks.</span><br
                              style="font-weight: bold;">
                            <span style="font-weight: bold;">Lee</span></font><br>
                        </div>
                      </div>
                      <pre><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
postgis-users mailing list
<a moz-do-not-send="true" rel="nofollow" class="moz-txt-link-abbreviated" ymailto="mailto:postgis-users@postgis.refractions.net" target="_blank" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><span><span>
<a moz-do-not-send="true" target="_blank" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
  </span></span></pre>
                    </blockquote>
                  </div>
                </div>
              </div>
              <pre><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
postgis-users mailing list
<a moz-do-not-send="true" rel="nofollow" class="moz-txt-link-abbreviated" ymailto="mailto:postgis-users@postgis.refractions.net" target="_blank" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a moz-do-not-send="true" rel="nofollow" class="moz-txt-link-freetext" target="_blank" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
  </pre>
            </blockquote>
          </div>
        </div>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
    </blockquote>
  </body>
</html>