-
Notifications
You must be signed in to change notification settings - Fork 748
Open
Open
Copy link
Labels
Description
While looking at #2616, I noticed many function headers in the Raster Operations docs are listed in order from most to least function arguments. In general, I think it's better to order it from least to most because that reading order is more intuitive to see what parameters are optional and often puts the most commonly used function header first.
Here's an example of the current order of RS_Count, for example.
RS_Count(raster: Raster, band: Integer = 1, excludeNoDataValue: Boolean = true)
RS_Count(raster: Raster, band: Integer = 1)
RS_Count(raster: Raster)
I think it's better to instead list it like this:
RS_Count(raster: Raster)
RS_Count(raster: Raster, band: Integer = 1)
RS_Count(raster: Raster, band: Integer = 1, excludeNoDataValue: Boolean = true)
List of functions that I noticed had this problem (there could be more):
- RS_AddBand
- RS_Count
- RS_Resample
- RS_SetBandNoDataValue
- RS_ZonalStats
- RS_ZonalStatsAll
- etc. (there are certainly more)
Interestingly, some functions like RS_NormalizeAll and RS_Interpolate are already in the desired order.
Reactions are currently unavailable