[GRASS-user] Creating isolines of walking distance
Richard Chirgwin
rchirgwin at ozemail.com.au
Sat Aug 20 03:01:21 EDT 2011
On 20/08/11 1:46 PM, grass-user-request at lists.osgeo.org wrote:
> ------------------------------
>
> Message: 11
> Date: Fri, 19 Aug 2011 22:47:54 -0400
> From: Josh Doe<josh at joshdoe.com>
> Subject: [GRASS-user] Creating isolines of walking distance
> To:grass-user at lists.osgeo.org
> Message-ID:
> <CAJnipd6MN4aiD42a5Asjw0ESmKU4fKHqqhy8gZJ37rfXcpJf2A at 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 at terra_centre
> # set bounds to match costs layer, and set resolution (for rasters)
> g.region vect=costs at terra_centre rows=256 cols=256
> # idw interpolation doesn't seem to work well
> #v.surf.idw --overwrite input=costs at 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 at terra_centre elev=interp_rst zcolumn=cost
> # set colors to be four solid shades of blue
> r.colors map=interp_rst at 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 at terra_centre
> output=contour at 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
More information about the grass-user
mailing list