<div>Hi Gavin</div><div><br></div><div>I am under strict instructions to calculate along the road network. It is for the Census of Agriculture. I have to calculate the travel time from each village to the nearest urban center "by motorable road" to have a feel of how long (far) farmers have to travel to get fertilizers, pesticides, seeds etc.</div>
<div><br></div><div><b><i>It is possible to calculate the closest along the network but that is a bit more complicated and straight line distance might be good enough.</i></b></div><div><br></div><div>I noted that pgRouting is well documented and will definitely give it a try, but since I have to calculate along the road network and have no prior experience of pgRouting, are you still recommending it?</div>
<div><br></div><div>rgds,</div><div>UazuĀ </div><div><br></div><br><div class="gmail_quote">On Mon, Jan 14, 2013 at 8:07 PM, Gavin Fleming <span dir="ltr"><<a href="mailto:gavin@afrispatial.co.za" target="_blank">gavin@afrispatial.co.za</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Uazu<br>
<br>
I would use pgRouting (<a href="http://pgrouting.org/" target="_blank">http://pgrouting.org/</a>)<br>
<br>
- install pgRouting<br>
- add pgRouting to a PostGIS database<br>
- load your roads and points into the database<br>
- set up network topology by adding nodes with the assign_vertex_id() function. Check that you have a properly connected network.<br>
- you can use any value as cost. In this case you'd want to calculate the cost field (pgRouting uses 'length' be default) as travel time. You could use road length with other information like speed limits to calculate or estimate travel time per road segment.<br>

- Set up lists or tables of your villages and urban centres<br>
- Use PostGIS functions to calculate the closest urban centre to each village (as the crow flies). It is possible to calculate the closest along the network but that is a bit more complicated and straight line distance might be good enough.<br>

- Then use pgRouting to calculate the shortest path between each of your chosen pairs and return travel time.<br>
<br>
To automate this I would write a Python script.<br>
<br>
There is good documentation and workshops on the pgRouting site and elsewhere.<br>
<br>
hth<br>
<br>
Gavin<div class="im"><br>
<br>
On 14/01/2013 16:20, Uazukuani wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Dear All<br>
<br>
<br>
I have a problem that I hope someone on this mailing list could assist with.<br>
<br></div>
I want to calculate travel time from (each) VILLAGE to the nearest URBAN CENTER along the road network*.*<div class="im"><br>
<br>
The output format could be text or GIS with at least 3 columns: 1. Village, 2. Nearest Urban Centre and 3. Travel Time.<br>
<br>
<br>
I have 3 data sets: 1. Villages (Point), 2. Urban centers (Point) & 3. Roads (Polyline/line) for the whole country (Namibia).<br>
<br>
<br>
I would appreciate if someone refers me to tutorials on this.<br>
<br>
I have access to PostGIS, QGIS and GvSIG, ArcInfo, GeoMedia Pro 6.x, MS SQL Server 2008 (Spatial) but am willing to try something else.<br>
<br>
<br>
Rgds,<br>
<br>
Uazu<br>
<br>
<br>
<br>
<br></div>
______________________________<u></u>_________________<br>
Africa mailing list<br>
<a href="mailto:Africa@lists.osgeo.org" target="_blank">Africa@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/africa" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/africa</a><br>
</blockquote>
<br>
<br>
-- <br>
regards<br>
<br>
Gavin<br>
<br>
Gavin Fleming<br>
<a href="http://afrispatial.co.za" target="_blank">http://afrispatial.co.za</a><br>
t: 0218620670<br>
c: 0845965680<br>
f: 0866164820<br>
<br>
______________________________<u></u>_________________<br>
Africa mailing list<br>
<a href="mailto:Africa@lists.osgeo.org" target="_blank">Africa@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/africa" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/africa</a><br>
</blockquote></div><br>