Opened 10 years ago

Last modified 5 years ago

#2625 new enhancement

r.stats's nsteps is not region-sensitive

Reported by: martinl Owned by: grass-dev@…
Priority: normal Milestone: 7.8.3
Component: Raster Version: svn-trunk
Keywords: r.stats, nsteps Cc:
CPU: Unspecified Platform: Unspecified

Description

r.stat's nsteps option is not region-sensitive, in other words ranges are calculated from original raster, not from current region. It can be very confusing for a user, I am not sure if it's a bug or just undocumented behaviour.

OK, I get 5 classes:

g.region rast=elevation
r.stats elevation nsteps=5 --q
55.578793-75.729007
75.729007-95.879221
95.879221-116.029436
116.029436-136.17965
136.17965-156.329865

Smaller number of classes when using sub-region:

g.region n=219326.524155 s=218357.261131 w=635573.588429 e=637027.482965 -a
r.stats elevation nsteps=5 --q
75.729007-95.879221
95.879221-116.029436
116.029436-136.17965

Change History (19)

comment:1 by neteler, 9 years ago

Milestone: 7.0.17.0.2

Ticket retargeted after 7.0.1 milestone closed

comment:2 by martinl, 9 years ago

Any opinion / feedback? Thanks.

in reply to:  2 comment:3 by mlennert, 9 years ago

Replying to martinl:

Any opinion / feedback? Thanks.

Both region-specific bins and map-specific bins can be useful. The latter allow easier comparison between different subregions, whereas the former allow getting the number of bins asked for in each subregion.

So, the ideal solution IMHO would be to have both. In the meantime, the fact that bins are calculated on the entire map's value range should be at least documented explicitly.

comment:4 by neteler, 9 years ago

Milestone: 7.0.27.0.3

Ticket retargeted after milestone closed

comment:5 by neteler, 9 years ago

Milestone: 7.0.3

Ticket retargeted after milestone closed

comment:6 by neteler, 9 years ago

Milestone: 7.0.4

Ticket retargeted after 7.0.3 milestone closed

comment:7 by martinl, 9 years ago

Milestone: 7.0.47.0.5

comment:8 by martinl, 8 years ago

Milestone: 7.0.57.3.0
Priority: majornormal
Type: defectenhancement

comment:9 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:10 by neteler, 7 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:11 by neteler, 7 years ago

Milestone: 7.4.17.4.2

comment:12 by martinl, 6 years ago

Milestone: 7.4.27.6.0

All enhancement tickets should be assigned to 7.6 milestone.

comment:13 by martinl, 6 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:14 by martinl, 6 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

comment:15 by martinl, 6 years ago

Milestone: 7.6.27.8.0

comment:16 by neteler, 5 years ago

Milestone: 7.8.07.8.1

Ticket retargeted after milestone closed

comment:17 by neteler, 5 years ago

Milestone: 7.8.17.8.2

Ticket retargeted after milestone closed

comment:18 by neteler, 5 years ago

Milestone: 7.8.2

Ticket retargeted after milestone closed

comment:19 by neteler, 5 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.