Skip to content

docs: Rearrange order of function headers in Raster Operation docs to be more intuitive #2617

@petern48

Description

@petern48

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions