Skip to content

Commit f478a07

Browse files
authored
[DOCS] Add SVG visuals for 12 raster functions (Phase 12) (#2695)
1 parent a17439e commit f478a07

33 files changed

Lines changed: 2678 additions & 21 deletions

File tree

docs/api/sql/Raster-Accessors/RS_RasterToWorldCoord.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
Introduction: Returns the upper left X and Y coordinates of the given row and column of the given raster geometric units of the geo-referenced raster as a Point geometry. If any out of bounds values are given, the X and Y coordinates of the assumed point considering existing raster pixel size and skew values will be returned.
2323

24+
![RS_RasterToWorldCoord](../../../image/RS_RasterToWorldCoord/RS_RasterToWorldCoord.svg "RS_RasterToWorldCoord")
25+
2426
Format: `RS_RasterToWorldCoord(raster: Raster, colX: Integer, rowY: Integer)`
2527

2628
Return type: `Geometry`

docs/api/sql/Raster-Accessors/RS_WorldToRasterCoord.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
Introduction: Returns the grid coordinate of the given world coordinates as a Point.
2323

24+
![RS_WorldToRasterCoord](../../../image/RS_WorldToRasterCoord/RS_WorldToRasterCoord.svg "RS_WorldToRasterCoord")
25+
2426
Format:
2527

2628
`RS_WorldToRasterCoord(raster: Raster, point: Geometry)`

docs/api/sql/Raster-Aggregate-Functions/RS_Union_Aggr.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Introduction: This function combines multiple rasters into a single multiband ra
2828
- Indexes to be unique and not repeated.
2929
- Rasters should be of the same shape.
3030

31+
![RS_Union_Aggr](../../../image/RS_Union_Aggr/RS_Union_Aggr.svg "RS_Union_Aggr")
32+
3133
Format: `RS_Union_Aggr(A: rasterColumn, B: indexColumn)`
3234

3335
Return type: `Raster`

docs/api/sql/Raster-Band-Accessors/RS_ZonalStats.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ The `allTouched` parameter (Since `v1.7.1`) determines how pixels are selected:
2626
- When true, any pixel touched by the geometry will be included.
2727
- When false (default), only pixels whose centroid intersects with the geometry will be included.
2828

29+
![RS_ZonalStats_allTouched](../../../image/RS_ZonalStats_allTouched/RS_ZonalStats_allTouched.svg "RS_ZonalStats_allTouched")
30+
2931
- `count`: Number of pixels in the region.
3032
- `sum`: Sum of pixel values.
3133
- `mean|average|avg`: Arithmetic mean.
@@ -46,6 +48,8 @@ The `allTouched` parameter (Since `v1.7.1`) determines how pixels are selected:
4648

4749
`lenient` parameter is set to `true` by default. The function will return `null` if the `raster` and `zone` geometry do not intersect.
4850

51+
![RS_ZonalStats](../../../image/RS_ZonalStats/RS_ZonalStats.svg "RS_ZonalStats")
52+
4953
Format:
5054

5155
```

docs/api/sql/Raster-Band-Accessors/RS_ZonalStatsAll.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ The `allTouched` parameter (Since `v1.7.1`) determines how pixels are selected:
2626
- When true, any pixel touched by the geometry will be included.
2727
- When false (default), only pixels whose centroid intersects with the geometry will be included.
2828

29+
![RS_ZonalStatsAll_allTouched](../../../image/RS_ZonalStatsAll_allTouched/RS_ZonalStatsAll_allTouched.svg "RS_ZonalStatsAll_allTouched")
30+
2931
- count: Count of the pixels.
3032
- sum: Sum of the pixel values.
3133
- mean: Arithmetic mean.
@@ -46,6 +48,8 @@ The `allTouched` parameter (Since `v1.7.1`) determines how pixels are selected:
4648

4749
`lenient` parameter is set to `true` by default. The function will return `null` if the `raster` and `zone` geometry do not intersect.
4850

51+
![RS_ZonalStatsAll](../../../image/RS_ZonalStatsAll/RS_ZonalStatsAll.svg "RS_ZonalStatsAll")
52+
4953
Format:
5054

5155
```

docs/api/sql/Raster-Map-Algebra-Operators/RS_MapAlgebra.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
Introduction: Apply a map algebra script on a raster.
2323

24+
![RS_MapAlgebra](../../../image/RS_MapAlgebra/RS_MapAlgebra.svg "RS_MapAlgebra")
25+
2426
Format:
2527

2628
```

docs/api/sql/Raster-Operators/RS_Clip.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ The `allTouched` parameter (Since `v1.7.1`) determines how pixels are selected:
3232
- Since `v1.5.1`, if the coordinate reference system (CRS) of the input `geom` geometry differs from that of the `raster`, then `geom` will be transformed to match the CRS of the `raster`. If the `raster` or `geom` doesn't have a CRS then it will default to `4326/WGS84`.
3333
- Since `v1.7.0`, `RS_Clip` function will return `null` if the `raster` and `geometry` geometry do not intersect. If you want to throw an exception in this case, you can set the `lenient` parameter to `false`.
3434

35+
![RS_Clip](../../../image/RS_Clip/RS_Clip.svg "RS_Clip")
36+
3537
Format:
3638

3739
```
@@ -58,10 +60,6 @@ Return type: `Raster`
5860

5961
Since: `v1.5.1`
6062

61-
Original Raster:
62-
63-
![Original raster](../../../image/original-raster-clip.png "Original raster")
64-
6563
SQL Example
6664

6765
```sql
@@ -72,10 +70,6 @@ SELECT RS_Clip(
7270
)
7371
```
7472

75-
Output:
76-
77-
![Cropped raster](../../../image/cropped-raster.png "Cropped raster")
78-
7973
SQL Example
8074

8175
```sql
@@ -85,7 +79,3 @@ SELECT RS_Clip(
8579
false, 200, false
8680
)
8781
```
88-
89-
Output:
90-
91-
![Clipped raster](../../../image/clipped-raster.png "Clipped raster")

docs/api/sql/Raster-Operators/RS_Interpolate.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ This technique is effective in scenarios where continuity of spatial data is imp
2626
!!!note
2727
This method assumes that the spatial influence of a variable diminishes with distance. In geospatial analysis, this means features or phenomena closer to a point of interest are given more weight than those further away. For example, in environmental data analysis, measurements from nearby locations have a greater impact on interpolated values than distant ones, reflecting the natural gradation and spatial continuity.
2828

29+
![RS_Interpolate](../../../image/RS_Interpolate/RS_Interpolate.svg "RS_Interpolate")
30+
2931
Formats:
3032

3133
```sql
@@ -74,8 +76,3 @@ SQL Example:
7476
```sql
7577
SELECT RS_Interpolate(raster, 1, 2.0, 'Variable', 12, 1000)
7678
```
77-
78-
Output (Shown as heatmap):
79-
80-
![Original raster](../../../image/heatmap_Interpolate.png "Original raster")
81-
![Interpolated raster](../../../image/heatmap_Interpolate2.png "Interpolated raster")

docs/api/sql/Raster-Operators/RS_NormalizeAll.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ A Safety mode is triggered when `noDataValue` is not given. This sets `noDataVal
3232
!!! Warning
3333
Using a noDataValue that falls within the normalization range can lead to loss of valid data. If any data value within a raster band matches the specified noDataValue, it will be replaced and cannot be distinguished or recovered later. Exercise caution in selecting a noDataValue to avoid unintentional data alteration.
3434

35+
![RS_NormalizeAll](../../../image/RS_NormalizeAll/RS_NormalizeAll.svg "RS_NormalizeAll")
36+
3537
Formats:
3638

3739
```

docs/api/sql/Raster-Operators/RS_ReprojectMatch.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ The default resampling algorithm is `NearestNeighbor`. The following resampling
3131

3232
This function serves the same purpose as the [`RasterArray.reproject_match` function in rioxarray](https://corteva.github.io/rioxarray/html/rioxarray.html#rioxarray.raster_array.RasterArray.reproject_match).
3333

34+
![RS_ReprojectMatch](../../../image/RS_ReprojectMatch/RS_ReprojectMatch.svg "RS_ReprojectMatch")
35+
36+
![RS_ReprojectMatch_clip](../../../image/RS_ReprojectMatch_clip/RS_ReprojectMatch_clip.svg "RS_ReprojectMatch_clip")
37+
3438
Format:
3539

3640
`RS_ReprojectMatch (raster: Raster, reference: Raster, algorithm: String)`
@@ -47,7 +51,3 @@ WITH t AS (
4751
RS_MapAlgebra(RS_MakeEmptyRaster(1, 500, 500, 16536,4185970, 1000, -1000, 0, 0, 32612), 'D', 'out = sin(y() * 0.2);') rast2
4852
) SELECT t.rast1, t.rast2, RS_ReprojectMatch(rast1, rast2) rast12, RS_ReprojectMatch(rast2, rast1) rast21 FROM t
4953
```
50-
51-
Output:
52-
53-
![Output](../../../image/ReprojectMatch_example.png)

0 commit comments

Comments
 (0)