<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">A solution of course is to escape the
      single quotes in the WITH queries, and then embed in the
      pgr_alphaShape as below.  Hope this helps someone:<br>
      <br>
      SELECT pgr_alphaShape('<br>
          WITH DD AS (<br>
          SELECT seq, id1 AS node, cost<br>
              FROM pgr_drivingDistance(<br>
                  ''SELECT id, source, target, cost FROM edge_table'',<br>
                  7, 1.5, false, false<br>
              )<br>
                ),<br>
          dd_points AS(<br>
          SELECT id, x, y<br>
              FROM vertex_table w, DD d<br>
              WHERE <a href="http://w.id">w.id</a> = d.node<br>
              )<br>
              SELECT * FROM dd_points<br>
          ');<br>
      <br>
      <br>
      <br>
      Best,<br>
      Steve<br>
      <br>
      <br>
      <br>
      On 06/21/2013 04:39 PM, Stephen Mather wrote:<br>
    </div>
    <blockquote cite="mid:51C4BA16.2090905@smathermather.com"
      type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Ahem, sent before I was done:<br>
        <br>
        <div>WITH DD AS (<br>
          SELECT seq, id1 AS node, cost<br>
                  FROM pgr_drivingDistance(<br>
                          'SELECT id, source, target, cost FROM
          edge_table',<br>
                          7, 1.5, false, false<br>
                  )<br>
                ),<br>
          dd_points AS(<br>
          SELECT id, x, y<br>
              FROM vertex_table w, DD d<br>
              WHERE <a moz-do-not-send="true" href="http://w.id">w.id</a>
          = d.node<br>
              )<br>
          SELECT pgr_alphaShape('SELECT * FROM dd_points');<br>
          <br>
          <br>
        </div>
        doesn't work...<br>
        <br>
        ERROR:  relation "dd_points" does not exist<br>
        <br>
        <br>
        I understand why this doesn't work, but I'm not sure how to work
        around.<br>
        <br>
        <br>
        On 06/21/2013 04:39 PM, Stephen Mather wrote:<br>
      </div>
      <blockquote cite="mid:51C4B9E4.7050903@smathermather.com"
        type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        <div class="moz-cite-prefix">Ok so it get's interesting trying
          to use embed one function within another, for example
          calculating driving distance and wrapping with alpha shape.<br>
          <br>
          This is as far as I've gotten:<br>
          <br>
          <br>
          <br>
          <br>
          On 06/21/2013 04:07 PM, Stephen Mather wrote:<br>
        </div>
        <blockquote cite="mid:51C4B291.3000705@smathermather.com"
          type="cite">
          <meta http-equiv="content-type" content="text/html;
            charset=ISO-8859-1">
          Hi All,<br>
          <br>
          Having a great time with 2.0-develop.  Question on
          pgr_drivingDistance.  I added geometry to the test dataset and
          wrote the following query to return all points within driving
          distance:<br>
          <br>
          <div class="moz-text-html" lang="x-western">
            <div dir="ltr">WITH DD AS (<br>
              SELECT seq, id1 AS node, cost<br>
                      FROM pgr_drivingDistance(<br>
                              'SELECT id, source, target, cost FROM
              edge_table',<br>
                              7, 1.5, false, false<br>
                      )<br>
                      )<br>
              <br>
              SELECT ST_AsText(the_geom)<br>
                  FROM vertex_table w, DD d<br>
                  WHERE <a moz-do-not-send="true" href="http://w.id">w.id</a>
              = d.node<br>
                  ;<br>
              <br>
            </div>
          </div>
          A) Am I correct in my usage of this?<br>
          B) Am I correct in assuming there is no way (at this time) to
          return subsets of lines, similar to TSP?<br>
          <br>
          Best,<br>
          Steve<br>
          <br>
          <fieldset class="mimeAttachmentHeader"></fieldset>
          <br>
          <pre wrap="">_______________________________________________
pgrouting-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a>
</pre>
        </blockquote>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>