[GRASS-dev] [GRASS GIS] #3336: r.viewshed max_distance always in meters

#3336: r.viewshed max_distance always in meters
-----------------------------+-------------------------
Reporter: annakrat | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.2.2
Component: Raster | Version: svn-trunk
Keywords: viewshed, units | CPU: All
Platform: All |
-----------------------------+-------------------------
r.viewshed manual says that max_distance option is entered in map units,
but in fact, the value is compared to the return value of
[https://grass.osgeo.org/programming7/gis_2distance_8c.html#afcaf2970186c47956fa768bf0fac404e
G_distance], which is always in meters.

So either we change the manual (simple, no change for the user), or we
change the code (simple, but changes behavior).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3336&gt;
GRASS GIS <https://grass.osgeo.org>

#3336: r.viewshed max_distance always in meters
-----------------------+-----------------------------
  Reporter: annakrat | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.2
Component: Raster | Version: svn-trunk
Resolution: | Keywords: viewshed, units
       CPU: All | Platform: All
-----------------------+-----------------------------

Comment (by pvanbosgeo):

If opting for the second option, I would suggest, if possible, to include
the option to set value in meters as well, or more in general, to include
the option to set the unit.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3336#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3336: r.viewshed max_distance always in meters
-----------------------+-----------------------------
  Reporter: annakrat | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.2
Component: Raster | Version: svn-trunk
Resolution: | Keywords: viewshed, units
       CPU: All | Platform: All
-----------------------+-----------------------------

Comment (by annakrat):

Replying to [comment:1 pvanbosgeo]:
> If opting for the second option, I would suggest, if possible, to
include the option to set value in meters as well, or more in general, to
include the option to set the unit.

I don't think that's necessary here, ideally max_distance should be in the
map units, that's what everybody would expect, setting specific units just
for max_distance doesn't add much to the usability in my opinion.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3336#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3336: r.viewshed max_distance always in meters
-----------------------+-----------------------------
  Reporter: annakrat | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.2
Component: Raster | Version: svn-trunk
Resolution: | Keywords: viewshed, units
       CPU: All | Platform: All
-----------------------+-----------------------------

Comment (by pvanbosgeo):

Replying to [comment:2 annakrat]:
> Replying to [comment:1 pvanbosgeo]:
> > If opting for the second option, I would suggest, if possible, to
include the option to set value in meters as well, or more in general, to
include the option to set the unit.
>
> I don't think that's necessary here, ideally max_distance should be in
the map units, that's what everybody would expect, setting specific units
just for max_distance doesn't add much to the usability in my opinion.
Can r.viewshed be run in latlon? In that case, being able to set the
maximum distance in meters could make sense?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3336#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3336: r.viewshed max_distance always in meters
-----------------------+-----------------------------
  Reporter: annakrat | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.2
Component: Raster | Version: svn-trunk
Resolution: | Keywords: viewshed, units
       CPU: All | Platform: All
-----------------------+-----------------------------

Comment (by annakrat):

Replying to [comment:3 pvanbosgeo]:
> Replying to [comment:2 annakrat]:
> > Replying to [comment:1 pvanbosgeo]:
> > > If opting for the second option, I would suggest, if possible, to
include the option to set value in meters as well, or more in general, to
include the option to set the unit.
> >
> > I don't think that's necessary here, ideally max_distance should be in
the map units, that's what everybody would expect, setting specific units
just for max_distance doesn't add much to the usability in my opinion.
> Can r.viewshed be run in latlon? In that case, being able to set the
maximum distance in meters could make sense?

I believe so, in latlon it uses meters, so that should be clarified in the
manual.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3336#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>