#2417: r.profile should report distance in location units --------------------------------+------------------------------------------- Reporter: annakrat | Owner: grass-dev@… Type: enhancement | Status: new Priority: normal | Milestone: 7.1.0 Component: Projections/Datums | Version: svn-trunk Keywords: r.profile, units | Platform: All Cpu: Unspecified | --------------------------------+-------------------------------------------
Comment(by annakrat): Replying to [comment:1 mlennert]: > Replying to [ticket:2417 annakrat]: > > r.profile reports the length in meters no matter which units the current location uses. It would be better if it could report it in the current units. > > The attached patch is a very simple attempt to use location units. I don't have time right now to revert the GUI profile tool changes to check whether this solves the problem, but at least with this patch distances are in location units. Thanks for looking into this. The patch seems to work. I got confused from the handling of units in the library which is completely weird, and I thought the conversion is not working properly but it's fortunately computed correctly. I improved the patch. The only problem is the name of the units which is in case of Foot_US not recognized and `G_database_unit_name` gives just ''unit''. As a result, r.profile now prints something like this {{{ Output Format: [Along Track Dist. (units)] [Elevation] Approx. transect length [205.092833] units ... }}} but this is a different problem. > > The question is whether this should be the default behaviour of r.profile, or whether this should be only activated when a flag is set. In my opinion, in most cases you want the current units. If you think the flag would be useful, it should switch to meters and by default (unset flag) use current units. Anyone has any opinion on adding this flag? -- Ticket URL: <http://trac.osgeo.org/grass/ticket/2417#comment:2> GRASS GIS <http://grass.osgeo.org> _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev