4

I have made isochrone lines using GRASS and QGIS, as shown. The lines show various distances to fire stations on a street network.

isochrones

Now I would like to turn these lines into polygons that look like isolines using QGIS. The lines to polygon tool does not work as expected. Is there a way?

4
  1. Convert lines to raster (this step depends slightly on exactly what form the original data is in, but the assumption is that you will start with a raster representing streets with each pixel containing the cumulative distance to the nearest point)
  2. Reclass distance raster corresponding to the desired isoline values (GRASS r.reclass)
  3. Create a regular point grid covering the street network, at a grid distance equal to the raster cell size (Vector > Research Tools > Regular Points)
  4. Using Point Sampling Tool plug-in, run point sampling tool to transfer distances to grid points (Plugins > Analyses > Point Sampling Tool)
  5. If necessary, select and export points that fall on street network
  6. Create Voronoi polygons around sampled street points (Vector > Geometry Tools > Voronoi Polygons)
  7. Dissolve Voronoi polygons based on distance class (Vector > Geoprocessing Tools > Dissolve)

Example below. I'm fairly certain I didn't quite calculate the street network distances correctly, but you get the idea. enter image description here

3
  • This is a good solution, but it won't work for my data. As the shapefile comes out of GRASS, it has only one field, cat, which indicates the point feature to which it belongs. The network feature that you input into GRASS has a distance and cost field, but nothing cumulative as you suggest. Any other solutions? Thanks. – Jim Sep 15 '14 at 22:01
  • Your original picture looks like something that could be rasterized (perhaps buffer, then rasterize) into the classified road raster created in Step 2 above. – phloem Sep 15 '14 at 22:20
  • Yes, that might work. However, I worked out another way. Please see the solution below. – Jim Sep 16 '14 at 22:10
2

Here's one solution. The green, yellow, and red lines in the first picture above represent costs for travel to the firestations, stored in a column named cat. The green have cat = 1, yellow cat = 2, red cat = 3. So we know from this layer (output of v.net.iso) which street segments are within which costs.

However, we also need to associate these segments with the given fire station so we can group them. To do this I first use v.net.alloc, which allocates the segments to their closest firestation, as shown. enter image description here

These segments also have a cat field, but it is the cat of the fire station.

Now I have to associate the isoline segments with the alloc segments. To do this I first use the QGIS selection tool to select the isoline segments with cat = 1 (the closest ones to a fire station). Then I use the Spatial Query tool to select those alloc segments that equal the isoline segments, as shown. enter image description here

Now I have segments that are within the cost AND have the cat of their closest fire station, as shown. enter image description here

Now I do a convex hull on these segments, grouping by the cat, as shown.enter image description here

(I named the cat field in the alloc layer cat_fire to distinguish it from the cat in the isoline layer.)

The result is a polygon that covers the segments, as shown. enter image description here

One problem I noticed is that the convex hull doesn't quite cover all of the isolines, as shown.enter image description here

I think this is because of the way that I selected the alloc segments. There might be a better way to do this. However, I got most of what I want here.

1
  • Would you give some detail related to v.net.alloc step ? – simo May 19 '15 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.