[GRASS-user] r.grow.distance can't create meters instead of map units

Markus Neteler neteler at osgeo.org
Fri Aug 2 02:53:10 PDT 2019


Hi Dimitris,

On Fri, Aug 2, 2019 at 8:58 AM Dimitris sal <jimmaras123 at gmail.com> wrote:
>
> Hello everyone
>
> My first post in this list,
>
> So i am trying to create a raster with r.grow.distance.

As you are working via QGIS, in which projection do you work?

> If i use the normal options everything works like the proximity analysis of QGIS, but when I try to add the advanced parameter Output distances in meters instead of map units i get the error "ERROR: Output distance in meters for lat/lon is only possible with 'metric=geodesic'"
>
> How do i add in the metrics the geodesic? I only have 4 euclidean,manhattan,squared,maximum.

Yes, this is a limitation in QGIS processing (for whatever reason).
The parameters made available to the QGIS users are often a subset of
those provided by GRASS GIS.

# QGIS processing
grep Metric /usr/share/qgis/python/plugins/processing/algs/grass7/description/r.grow.distance.txt
QgsProcessingParameterEnum|metric|Metric|euclidean;squared;maximum;manhattan|False|0|True

# GRASS GIS
r.grow.distance --help
...
   metric   Metric
             options: euclidean,squared,maximum,manhattan,geodesic
             default: euclidean

The change would be needed here:
https://github.com/qgis/QGIS/blob/release-3_8/python/plugins/processing/algs/grass7/description/r.grow.distance.txt

> Is there any alternative to create the raster in meters instead of map units?

As a local workaround, you can simply search for r.grow.distance.txt
on your computer and add the missing "geodesic" there.
(and open an issue with the QGIS project or open a pull request with
the change there, or someone else does that).

Best,
Markus

-- 
Markus Neteler, PhD
https://www.mundialis.de - free data with free software
https://grass.osgeo.org
https://courses.neteler.org/blog


More information about the grass-user mailing list