Opened 16 years ago
Last modified 6 years ago
#248 new enhancement
v.info vs. r.info: different region output formats
Reported by: | sebastianh | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 7.6.2 |
Component: | Default | Version: | unspecified |
Keywords: | v.info, r.info, region output | Cc: | |
CPU: | All | Platform: | All |
Description
In a location with a geographic crs, the region outputs (esp. the unit formats) of vector and raster layers differs from each other. v.info prints the region in decimal degrees (DD) whereas r.info produces an output in degrees,minutes,seconds (DMS).
For example (nc_ll location from www.grassbooks.org):
> v.info -g precip_30ynormals north=36.49917 south=33.99472 east=-75.62194 west=-84.02389 top=1615.440000 bottom=2.438400 > r.info -g elev_ned_03arcsec north=35:54:40.666666N south=35:35:17.334885N east=78:27:08.335106W west=78:49:17.333333W
For parsing both ouputs with external tools, it would be better if the formats were equal (preferably decimal degrees).
Attachments (1)
Change History (17)
comment:1 by , 16 years ago
follow-up: 8 comment:2 by , 16 years ago
BTW in GRASS7 I would like to add shell script style output for r/v.info. To follow standard flag naming, this flag should '-g' which is now reserved for "Print map region only" (which could be renamed to '-r'.) ?
Martin
comment:3 by , 16 years ago
Type: | defect → enhancement |
---|
Corrected patch attached:
r.info -g elev_ned_03arcsec north=35:54:40.666666N south=35:35:17.334885N east=78:27:08.335106W west=78:49:17.333333W top=170.099487 bottom=20.991688
comment:5 by , 16 years ago
comment:6 by , 16 years ago
Replying to sebastianh:
In a location with a geographic crs, the region outputs (esp. the unit formats) of vector and raster layers differs from each other. v.info prints the region in decimal degrees (DD) whereas r.info produces an output in degrees,minutes,seconds (DMS).
For parsing both ouputs with external tools, it would be better if the formats were equal (preferably decimal degrees).
Done (also for r3.info). In r34118, -g now always outputs in decimal.
comment:8 by , 16 years ago
Replying to martinl:
BTW in GRASS7 I would like to add shell script style output for r/v.info.
? don't we already have that in GRASS 6.x from lots of flags?
To follow standard flag naming, this flag should '-g' which is now reserved for "Print map region only" (which could be renamed to '-r'.) ?
-g is used across modules more generally to mean "output in shell script style"; albeit usually (but not always) to do with region bounds. (eg r.univar)
As '-r' works quite nicely for "range" (IMO) I don't see the need for a change. As long as we are consistent it is quickly learned.
2c, Hamish
comment:9 by , 9 years ago
Milestone: | 7.0.0 → 7.0.5 |
---|
comment:10 by , 8 years ago
Milestone: | 7.0.5 → 7.3.0 |
---|
comment:13 by , 7 years ago
Milestone: | 7.4.1 → 7.4.2 |
---|
comment:14 by , 6 years ago
Milestone: | 7.4.2 → 7.6.0 |
---|
All enhancement tickets should be assigned to 7.6 milestone.
I have added top/bottom support (patch attached) but it seems to work only in not-latlong locations:
{{{r.info -g elev_ned_03arcsec north=35:54:40.666666N south=35:35:17.334885N east=78:27:08.335106W west=78:49:17.333333W top=1E bottom=0 }}}
Apparently there is some extra magic in g.region -p3.
Markus