22 | | * Generally, when NULL rasters are provided, return NULL. If the function involves a second non NULL raster and something can be done with it, do it. |
23 | | * Generally, when empty rasters are provided (ST_IsEmpty, width=0 or height=0), return an empty raster. If the function involves a second non empty raster and something can be done with it, do it. |
24 | | * Generally, when a !HasNoBand(rast) or a !HasNoBand(rast, band) raster is provided return a raster with no band but with the right extent. If the function involves a second raster having a band or the band, treat the first missing band like a !BandIsNoData. |
25 | | * A !BandIsNoData raster is a normal raster but many functions can be optimized with this type of raster. |
26 | | * All functions having missing the requested information (about its extent when it is a NULL or an empty raster or about its band when it is a !HasNoBand(rast) or a !HasNoBand(rast, band) raster) should return NULL or a documented value. |
27 | | * Try as less as possible to return EXCEPTION (or ERROR). |
| 22 | 1) Generally, when NULL rasters are provided, return NULL. If the function involves a second non NULL raster and something can be done with it, do it. |
| 23 | |
| 24 | 2) Generally, when empty rasters are provided (ST_IsEmpty, width=0 or height=0), return an empty raster. If the function involves a second non empty raster and something can be done with it, do it. |
| 25 | |
| 26 | 2) Generally, when a !HasNoBand(rast) or a !HasNoBand(rast, band) raster is provided return a raster with no band but with the right extent. If the function involves a second raster having a band or the band, treat the first missing band like a !BandIsNoData. |
| 27 | |
| 28 | 4) A !BandIsNoData raster is a normal raster but many functions can be optimized with this type of raster. |
| 29 | |
| 30 | 5) All functions having missing the requested information (about its extent when it is a NULL or an empty raster or about its band when it is a !HasNoBand(rast) or a !HasNoBand(rast, band) raster) should return NULL or a documented value. |
| 31 | |
| 32 | 6) Try as less as possible to return EXCEPTION (or ERROR). |