1

I try to calculate raster distance to restaurants using proximity in QGIS. I have the following data:

  • Binary Int Raster with restaurant location
  • Perimeter Shapefile

Using QGIS GDAL Proximity, I got this error message, which I don't understand:GDAL Proxmity

Using SAGA GIS, I was able to create the Distance Raster, but only in a square defined by the uttermost 1-value pixels. I'd like to calculate in my whole perimeter. In the following image you see the cells (shown as point vectors for better visibility), distance raster and perimeter. enter image description here

So, how can increase the area of the raster calculation?

2

It seems the underlying question is how to set up a grid system which covers the extent of the perimeter polygon, because it defines the workflow.


An approach using SAGA GUI can be summarized as below.

  1. Create a grid system which covers whole your area of interest. In this case you can choose the extent of the perimeter polygon.
  2. Rasterize the point layer (your restaurant shapefile) onto the blank grid made in the step 1 above.
  3. Create proximity raster from the rasterized points.
  4. Clip the proximity raster by the AOI polygon (perimeter).

Details:

Step 1: Create Grid --- SAGA Tool Libraries | Grid | Tools | Create Grid System

enter image description here

  • Extent Definition: one or more shapes layers ...This enables us to select shapefile layers.
  • Data Objects Shapes >> Shapes Layers ... Select your perimeter polygon.

Step 2: Rasterize --- SAGA Tool Libraries | Grid | Gridding | Shapes to Grid

  • Shapes ...Select your restaurant point layer.
  • Target Grid System... Select the grid system generated in the Step 1.

Step 3: Proximity raster --- SAGA Tool Libraries | Grid | Tools | Proximity Grid

enter image description here

Step 4: Clipping --- SAGA Tool Libraries | Shapes | Grid Tools | Clip Grid with Polygon

  • Polygons ... Select your perimeter polygon shapefile, which cutouts the raster.

enter image description here

  • 1
    Thank you! I will create a "template" grid system as I will need this more than once! – Kevkev770 Jan 24 '18 at 18:37
  • I don't have SAGA standalone installed and would prefer to use QGIS UI. Where do I find the Create Grid Systemtool within QGIS? – Kevkev770 Jan 25 '18 at 15:47
  • @Kevkev770 Unfortunately the tool (or its equivalent) is not available in the QGIS. If you are using QGIS standalone, SAGA GUI comes along with it. – Kazuhito Jan 25 '18 at 17:27
  • 1
    @Kevkev770 You said you used SAGA GIS in your original question. Can I understand that you have access SAGA algorithms through the Processing Toolbox, but not SAGA GUI? If so, please try Constant grid which is in SAGA - Raster tools. – Kazuhito Jan 26 '18 at 15:27
  • 1
    sorry I wasn't clear! yes I used saga proximity through processing toolbox! pretty cool now, it worked! Maybe there is even a more straight approach, as I realized it is possible to define an output extent on map canvas! – Kevkev770 Jan 26 '18 at 16:32

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.