[GRASS-user] Creating isolines of walking distance

On 20/08/11 1:46 PM, grass-user-request@lists.osgeo.org wrote:

------------------------------

Message: 11
Date: Fri, 19 Aug 2011 22:47:54 -0400
From: Josh Doe<josh@joshdoe.com>
Subject: [GRASS-user] Creating isolines of walking distance
To:grass-user@lists.osgeo.org
Message-ID:
  <CAJnipd6MN4aiD42a5Asjw0ESmKU4fKHqqhy8gZJ37rfXcpJf2A@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hello all,
I'm a newbie to GIS and especially GRASS, but I'm trying to create
walking distance isolines (isospace?) from OpenStreetMap data, and so
far I've been successful using PostGIS, pgRouting (driving_distance()
function), QGIS, and the QGIS contour plugin. However I'd like to be
able to do this via the command line for a web service, and would like
to try and do this in GRASS, however I have had some difficulties.

Here is what I've created in QGIS and want to create in GRASS (the blue areas):
http://wiki.openstreetmap.org/wiki/File:SRTS_walkability_before_new_sidewalk.jpg

This is the Shapefile of points resulting from pgRouting's
driving_distance() function, with the cost column containing the
distance in km from the entrance to a school:
http://dl.dropbox.com/u/23634456/terra_centre_1mile_points.zip

I'm not sure what the best (and more importantly, fastest) method is
to produce this, but here's what I have so far. I only care about
creating filled areas for 1/4, 1/2, 3/4 and 1 mile (0.4, 0.8, 1.2, 1.6
km), so don't really need or want full interpolation (e.g. a
gradient), especially if it takes more processing time.

# read in shapefile to costs layer in terra_centre mapset
v.in.ogr dsn=/home/user/points.shp output=costs@terra_centre
# set bounds to match costs layer, and set resolution (for rasters)
g.region vect=costs@terra_centre rows=256 cols=256
# idw interpolation doesn't seem to work well
#v.surf.idw --overwrite input=costs@terra_centre output=interp_idw column=cost
# perform interpolation of costs layer using cost column, and output
to interp_rst layer
v.surf.rst input=costs@terra_centre elev=interp_rst zcolumn=cost
# set colors to be four solid shades of blue
r.colors map=interp_rst@terra_centre color=rules
0 0:0:255
0.4 0:0:255
0.401 50:50:255
0.8 50:50:255
0.801 100:100:255
1.2 100:100:255
1.201 150:150:255
1.6 150:150:255
1.601 white
10 white
end
# create contour lines at 1/4, 1/2, 3/4, and 1 mile
r.contour --overwrite input=interp_rst@terra_centre
output=contour@terra_centre levels=0.4,0.8,1.2,1.6

My questions are:
1) Is there a better way to achieve what the contour plugin of QGIS does?
2) How could I create a polygon layer (for the four bands) from the
contour layer?
3) How could I create a similar result using v.net.iso instead of pgRouting?

Thanks for any help,
-Josh

Josh,

I'd suggest working through the Spearfish v.net.path example here, as a familiarisation exercise:

http://grass.osgeo.org/grass64/manuals/html64_user/v.net.path.html

Cheers,
Richard

Richard wrote:

I'd suggest working through the Spearfish v.net.path
example here, as a familiarisation exercise:

http://grass.osgeo.org/grass64/manuals/html64_user/v.net.path.html

if you have elevation data to add to the mix, the r.walk module
may also be of interest,
http://grass.osgeo.org/grass64/manuals/html64_user/r.walk.html

ISTR a nice demo of that with some screenshots of distance
to walk in 10 minutes along the streets of Trento(?), but can't
put my finger on it right now.

Hamish

On Sat, Aug 20, 2011 at 9:15 AM, Hamish <hamish_b@yahoo.com> wrote:

Richard wrote:

I'd suggest working through the Spearfish v.net.path
example here, as a familiarisation exercise:

http://grass.osgeo.org/grass64/manuals/html64_user/v.net.path.html

if you have elevation data to add to the mix, the r.walk module
may also be of interest,
http://grass.osgeo.org/grass64/manuals/html64_user/r.walk.html

ISTR a nice demo of that with some screenshots of distance
to walk in 10 minutes along the streets of Trento(?), but can't
put my finger on it right now.

Here it is:

http://www.slideshare.net/markusN/25-years-of-grass-gis-3005600
-> slides 11+12

and
http://gis.cri.fmach.it/download/neteler_gis_intro_iasma.pdf
-> slides 6+7

Markus

On Sun, Aug 21, 2011 at 12:25 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Sat, Aug 20, 2011 at 9:15 AM, Hamish <hamish_b@yahoo.com> wrote:

Richard wrote:

I'd suggest working through the Spearfish v.net.path
example here, as a familiarisation exercise:

http://grass.osgeo.org/grass64/manuals/html64_user/v.net.path.html

if you have elevation data to add to the mix, the r.walk module
may also be of interest,
http://grass.osgeo.org/grass64/manuals/html64_user/r.walk.html

ISTR a nice demo of that with some screenshots of distance
to walk in 10 minutes along the streets of Trento(?), but can't
put my finger on it right now.

Here it is:

http://www.slideshare.net/markusN/25-years-of-grass-gis-3005600
-> slides 11+12

and
http://gis.cri.fmach.it/download/neteler_gis_intro_iasma.pdf
-> slides 6+7

Those are great examples, thanks! I'd love it if they'd share the
source/script for creating those...

Thanks,
-Josh