/usr/share/doc/postgresql-9.5-pgrouting-doc/html/en/src/driving_distance/doc/dd_driving_distance_v2.html is in postgresql-9.5-pgrouting-doc 2.1.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pgr_drivingDistance (V2.0) — pgRouting Manual (2.1.0)</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '2.1.0 (b38118a master)',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<script type="text/javascript" src="../../../_static/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="shortcut icon" href="../../../_static/favicon.ico"/>
<link rel="top" title="pgRouting Manual (2.1.0)" href="../../../doc/index.html" />
<link rel="up" title="Driving Distance" href="index.html" />
<link rel="next" title="pgr_drivingDistance" href="dd_driving_distance_v3.html" />
<link rel="prev" title="Driving Distance" href="index.html" />
</head>
<body role="document">
<div class="header" role="banner"><img class="rightlogo" src="../../../_static/pgrouting.png" alt="Logo"/><h1 class="heading"><a href="../../../index.html">
<span>pgRouting Manual (2.1.0)</span></a></h1>
<h2 class="heading"><span>pgr_drivingDistance (V2.0)</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
<p>
«  <a href="index.html">Driving Distance</a>
  ::  
<a class="uplink" href="../../../doc/index.html">Contents</a>
  ::  
<a href="dd_driving_distance_v3.html">pgr_drivingDistance</a>  »
</p>
</div>
<div class="content">
<div class="section" id="pgr-drivingdistance-v2-0">
<span id="pgr-driving-distance-v2"></span><h1>pgr_drivingDistance (V2.0)<a class="headerlink" href="#pgr-drivingdistance-v2-0" title="Permalink to this headline">¶</a></h1>
<div class="section" id="name">
<span id="index-0"></span><h2>Name<a class="headerlink" href="#name" title="Permalink to this headline">¶</a></h2>
<p><code class="docutils literal"><span class="pre">pgr_drivingDistance</span></code> - Returns the driving distance from a start node.</p>
</div>
<div class="section" id="synopsis">
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
<p>This function computes a Dijkstra shortest path solution them extracts the cost to get to each node in the network from the starting node. Using these nodes and costs it is possible to compute constant drive time polygons. Returns a set of <a class="reference internal" href="../../common/doc/types/cost_result.html#type-cost-result"><span>pgr_costResult</span></a> (seq, id1, id2, cost) rows, that make up a list of accessible points.</p>
<div class="highlight-sql"><div class="highlight"><pre><span class="n">pgr_costResult</span><span class="p">[]</span> <span class="n">pgr_drivingDistance</span><span class="p">(</span><span class="nb">text</span> <span class="k">sql</span><span class="p">,</span> <span class="nb">integer</span> <span class="k">source</span><span class="p">,</span> <span class="n">double</span> <span class="k">precision</span> <span class="n">distance</span><span class="p">,</span>
<span class="nb">boolean</span> <span class="n">directed</span><span class="p">,</span> <span class="nb">boolean</span> <span class="n">has_rcost</span><span class="p">);</span>
</pre></div>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p>This signature is being deprecated on version 2.1, Please use it
without the <code class="docutils literal"><span class="pre">has_rcost</span></code> flag instead:</p>
<p><code class="docutils literal"><span class="pre">pgr_drivingDistance(sql,</span> <span class="pre">start_v,</span> <span class="pre">distance,</span> <span class="pre">directed)</span></code></p>
<p class="last">See <a class="reference internal" href="dd_driving_distance_v3.html#pgr-driving-distance-v3"><span>pgr_drivingDistance</span></a></p>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">sql:</th><td class="field-body"><p class="first">a SQL query, which should return a set of rows with the following columns:</p>
<div class="highlight-sql"><div class="highlight"><pre><span class="k">SELECT</span> <span class="n">id</span><span class="p">,</span> <span class="k">source</span><span class="p">,</span> <span class="n">target</span><span class="p">,</span> <span class="n">cost</span> <span class="p">[,</span><span class="n">reverse_cost</span><span class="p">]</span> <span class="k">FROM</span> <span class="n">edge_table</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body"><code class="docutils literal"><span class="pre">int4</span></code> identifier of the edge</td>
</tr>
<tr class="field-even field"><th class="field-name">source:</th><td class="field-body"><code class="docutils literal"><span class="pre">int4</span></code> identifier of the source vertex</td>
</tr>
<tr class="field-odd field"><th class="field-name">target:</th><td class="field-body"><code class="docutils literal"><span class="pre">int4</span></code> identifier of the target vertex</td>
</tr>
<tr class="field-even field"><th class="field-name">cost:</th><td class="field-body"><code class="docutils literal"><span class="pre">float8</span></code> value, of the edge traversal cost. A negative cost will prevent the edge from being inserted in the graph.</td>
</tr>
<tr class="field-odd field"><th class="field-name">reverse_cost:</th><td class="field-body">(optional) the cost for the reverse traversal of the edge. This is only used when the <code class="docutils literal"><span class="pre">directed</span></code> and <code class="docutils literal"><span class="pre">has_rcost</span></code> parameters are <code class="docutils literal"><span class="pre">true</span></code> (see the above remark about negative costs).</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="field-even field"><th class="field-name">source:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">int4</span></code> id of the start point</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">distance:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">float8</span></code> value in edge cost units (not in projection units - they might be different).</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">directed:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">true</span></code> if the graph is directed</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">has_rcost:</th><td class="field-body"><p class="first last">if <code class="docutils literal"><span class="pre">true</span></code>, the <code class="docutils literal"><span class="pre">reverse_cost</span></code> column of the SQL generated set of rows will be used for the cost of the traversal of the edge in the opposite direction.</p>
</td>
</tr>
</tbody>
</table>
<p>Returns set of <a class="reference internal" href="../../common/doc/types/cost_result.html#type-cost-result"><span>pgr_costResult[]</span></a>:</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">seq:</th><td class="field-body">row sequence</td>
</tr>
<tr class="field-even field"><th class="field-name">id1:</th><td class="field-body">node ID</td>
</tr>
<tr class="field-odd field"><th class="field-name">id2:</th><td class="field-body">edge ID (this is probably not a useful item)</td>
</tr>
<tr class="field-even field"><th class="field-name">cost:</th><td class="field-body">cost to get to this node ID</td>
</tr>
</tbody>
</table>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">You must reconnect to the database after <code class="docutils literal"><span class="pre">CREATE</span> <span class="pre">EXTENSION</span> <span class="pre">pgrouting</span></code>. Otherwise the function will return <code class="docutils literal"><span class="pre">Error</span> <span class="pre">computing</span> <span class="pre">path:</span> <span class="pre">std::bad_alloc</span></code>.</p>
</div>
<p class="rubric">History</p>
<ul class="simple">
<li>Renamed in version 2.0.0</li>
</ul>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Without <code class="docutils literal"><span class="pre">reverse_cost</span></code></li>
</ul>
<div class="highlight-sql"><div class="highlight"><pre><span class="k">SELECT</span> <span class="n">seq</span><span class="p">,</span> <span class="n">id1</span> <span class="k">AS</span> <span class="n">node</span><span class="p">,</span> <span class="n">cost</span>
<span class="k">FROM</span> <span class="n">pgr_drivingDistance</span><span class="p">(</span>
<span class="s1">'SELECT id, source, target, cost FROM edge_table'</span><span class="p">,</span>
<span class="mi">7</span><span class="p">,</span> <span class="mi">1</span><span class="p">.</span><span class="mi">5</span><span class="p">,</span> <span class="k">false</span><span class="p">,</span> <span class="k">false</span>
<span class="p">);</span>
<span class="n">seq</span> <span class="o">|</span> <span class="n">node</span> <span class="o">|</span> <span class="n">cost</span>
<span class="c1">-----+------+------</span>
<span class="mi">0</span> <span class="o">|</span> <span class="mi">7</span> <span class="o">|</span> <span class="mi">0</span>
<span class="mi">1</span> <span class="o">|</span> <span class="mi">8</span> <span class="o">|</span> <span class="mi">1</span>
<span class="p">(</span><span class="mi">2</span> <span class="k">rows</span><span class="p">)</span>
</pre></div>
</div>
<ul class="simple">
<li>With <code class="docutils literal"><span class="pre">reverse_cost</span></code></li>
</ul>
<div class="highlight-sql"><div class="highlight"><pre><span class="k">SELECT</span> <span class="n">seq</span><span class="p">,</span> <span class="n">id1</span> <span class="k">AS</span> <span class="n">node</span><span class="p">,</span> <span class="n">cost</span>
<span class="k">FROM</span> <span class="n">pgr_drivingDistance</span><span class="p">(</span>
<span class="s1">'SELECT id, source, target, cost, reverse_cost FROM edge_table'</span><span class="p">,</span>
<span class="mi">7</span><span class="p">,</span> <span class="mi">1</span><span class="p">.</span><span class="mi">5</span><span class="p">,</span> <span class="k">true</span><span class="p">,</span> <span class="k">true</span>
<span class="p">);</span>
<span class="n">seq</span> <span class="o">|</span> <span class="n">node</span> <span class="o">|</span> <span class="n">cost</span>
<span class="c1">-----+------+------</span>
<span class="mi">0</span> <span class="o">|</span> <span class="mi">7</span> <span class="o">|</span> <span class="mi">0</span>
<span class="mi">1</span> <span class="o">|</span> <span class="mi">8</span> <span class="o">|</span> <span class="mi">1</span>
<span class="p">(</span><span class="mi">5</span> <span class="k">rows</span><span class="p">)</span>
</pre></div>
</div>
<p>The queries use the <a class="reference internal" href="../../../doc/src/developer/sampledata.html#sampledata"><span>Sample Data</span></a> network.</p>
</div>
<div class="section" id="see-also">
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><a class="reference internal" href="dd_alphashape.html#pgr-alphashape"><span>pgr_alphaShape</span></a> - Alpha shape computation</li>
<li><a class="reference internal" href="dd_points_as_polygon.html#pgr-points-as-polygon"><span>pgr_pointsAsPolygon</span></a> - Polygon around set of points</li>
</ul>
</div>
</div>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
<p>
«  <a href="index.html">Driving Distance</a>
  ::  
<a class="uplink" href="../../../doc/index.html">Contents</a>
  ::  
<a href="dd_driving_distance_v3.html">pgr_drivingDistance</a>  »
</p>
</div>
<div class="footer" role="contentinfo">
© Copyright pgRouting Contributors - Version 2.1.0 (b38118a master).
Last updated on Feb 05, 2016.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.5.
</div>
</body>
</html>
|