1

I aim to calculate the average district-specific proximity to river in India by using the proximity (raster distance) function and the following data here and the GADM India data (level 2 for districts).

First, I convert the river shapefile to a raster and use 0.0166667*0.0166667 resolution of the georeferenced units (output raster size), following these instructions. Then I apply the proximity function.

However, I am not sure what are the units of the generated distances.

If I right click on the layer it says the following:

CRS EPSG:4326 - WGS 84 - Geographic Extent 180.0000000000000000,-85.1921875000000171 : 180.0000000000000000,83.5996093750000000

Unit degrees Feature count 1,428.

Here are the proximity properties:

CRS EPSG:4326 - WGS 84 - Geographic Extent -180.0000000000000000,-85.1840615250000042 : 180.0007200000000012,83.5996093750000000

Unit degrees Width 21600 Height 10127

I tried to apply the measure tool and the values resembled mostly miles. Is this possible?

  • 1
    They're probably the same units as the layer's CRS, but you can easily check by measuring the distance with the Measure tool and comparing that to the calculated distance. – csk Jul 18 at 16:28
  • Thank you for your answeer. So if I right click on the layer it says the following: CRS EPSG:4326 - WGS 84 - Geographic Extent -180.0000000000000000,-85.1921875000000171 : 180.0000000000000000,83.5996093750000000 Unit degrees Feature count 1,428. I tried to apply the measure tool and the values resembled mostly miles. Is this possible? – BarboraSedova Jul 19 at 9:17
  • The data that I provided in the previous comment were on the shapefile. Here are the proximity properties. CRS EPSG:4326 - WGS 84 - Geographic Extent -180.0000000000000000,-85.1840615250000042 : 180.0007200000000012,83.5996093750000000 Unit degrees Width 21600 Height 10127 Would be happy for any help. – BarboraSedova Jul 19 at 9:38
0

By default, the Proximity tool returns a proximity raster with distances calculated in the georeferenced coordinates. Depending on the input's layer CRS, the distance will be calculated in units such as meters and degrees. However, you can also specify the output distance to be in pixel units if you wanted to.

  • Thank you for your answeer. So if I right click on the layer it says the following: CRS EPSG:4326 - WGS 84 - Geographic Extent -180.0000000000000000,-85.1921875000000171 : 180.0000000000000000,83.5996093750000000 Unit degrees Feature count 1,428. I tried to apply the measure tool and the values resembled mostly miles. Is this possible? – BarboraSedova Jul 19 at 9:19
  • The data that I provided in the previous comment were on the shapefile. Here are the proximity properties. CRS EPSG:4326 - WGS 84 - Geographic Extent -180.0000000000000000,-85.1840615250000042 : 180.0007200000000012,83.5996093750000000 Unit degrees Width 21600 Height 10127 Would be happy for any help. – BarboraSedova Jul 19 at 9:38
0

According to the documentation for the GDAL proximity algorithm, the distance units are pixels by default. You have the option of specifying georeferenced coordinates by adding the parameter -distunits GEO.

-distunits PIXEL|GEO

Indicate whether distances generated should be in pixel or georeferenced coordinates (default PIXEL).

If you didn't add a distunits parameter, your output raster has proximity distances in pixels.

The natural next question is, "How big is a pixel?"

The pixel size of a raster can be found in the Information panel of the Layer Properties dialog. Since your original raster uses a coordinate system whose units are degrees, the pixel size is measured in degrees.

To convert that to a useful distance measurement in meters, kilometers, feet or miles, you have a couple of options.

  • One option is to use the Raster Calculator to convert the proximity raster values to your chosen units. Note that converting from degrees to linear distance units involces some degree of error, because one degree is a different size at different latitudes. Use a formula like this (I used placeholders for the raster band names and numbers; you should substitute the actual values):

    myproxmityraster@1*[pixel size in degrees]*[conversion factor from degrees to distance units *at this latitude*]
    
  • Another option (probably the best option) is to re-do the proximity analysis in a projected coordinate system that uses the distance units you want. Pick an appropriate equal-distance coordinate system for the location and scale. (For help choosing an appropriate CRS, see this article and this one.) Re-project the input layers into that CRS. Then run the proximity algorithm with the -distunits GEO parameter. The distances will be calculated in the same units as the CRS you chose.

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.