I have a raster layer with travel times from a specified point in my city's downtown. What I'd like to do is select all of the census blocks that lie at least partially within 45 minutes of downtown (i.e. I'd like to select all of the vector features that contain at least one raster pixel with a value of less than 45). I'd like to do this in QGIS if at all possible; suggestions for other FOSS software are also welcome.

  • 1
    A search for "zonal min" plus the name of your software will usually dig up what you're looking for. – whuber Mar 1 '12 at 18:19
  • @whuber If I'm understanding you correctly, that will only allow me to get summary statistics of the values of attributes, not actually select the vector features. – mattwigway Mar 2 '12 at 2:41
  • Selection is trivially easy once you have the values! Just request all blocks whose zonal min is less than 45. (If the zonal mins are stored in a separate file, join that to the Census block table and then do the selection.) – whuber Mar 2 '12 at 14:29
  1. Use the raster calculator to filter your raster based on < 45. Result should be a new raster with 0 and 1, 1 is True.
  2. Convert the new raster mask to vector with GDALTools (Raster menu) Conversion -> Polygonize
  3. Intersect or Spatial Select based on intersection, or clip or extract the census layer based on your raster converted to polygon.

This is but one possible way to do such an analysis using QGIS. Spatial databases such as rasterlite or postgis is another option.


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.