Skip to content

Commit 2986a47

Browse files
committed
Update raster join docs page to include resampling method
Signed-off-by: Jason T. Brown <[email protected]>
1 parent 4ac0fb3 commit 2986a47

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pyrasterframes/src/main/python/docs/raster-join.pymd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ A common operation for raster data is reprojecting or warping the data to a diff
1717

1818
In RasterFrames, you can perform a **Raster Join** on two DataFrames containing raster data.
1919
The operation will perform a _spatial join_ based on the [CRS][CRS] and [extent][extent] data in each DataFrame. By default it is a left join and uses an intersection operator.
20-
For each candidate row, all _tile_ columns on the right hand side are warped to match the left hand side's [CRS][CRS], [extent][extent], and dimensions. Warping relies on GeoTrellis library code and uses nearest neighbor resampling method.
20+
For each candidate row, all _tile_ columns on the right hand side are warped to match the left hand side's [CRS][CRS], [extent][extent], and dimensions. Warping relies on GeoTrellis library code. You can specify the resampling method to be applied as one of: nearest_neighbor, bilinear, cubic_convolution, cubic_spline, lanczos, average, mode, median, max, min, or sum.
2121
The operation is also an aggregate, with multiple intersecting right-hand side tiles `merge`d into the result. There is no guarantee about the ordering of tiles used to select cell values in the case of overlapping tiles.
2222
When using the @ref:[`raster` DataSource](raster-join.md) you will automatically get the @ref:[CRS][CRS] and @ref:[extent][extent] information needed to do this operation.
2323

@@ -36,7 +36,7 @@ landsat8 = spark.read.raster('https://landsat-pds.s3.us-west-2.amazonaws.com/c1/
3636
spatial_index_partitions=True) \
3737
.withColumnRenamed('proj_raster', 'landsat')
3838

39-
rj = landsat8.raster_join(modis)
39+
rj = landsat8.raster_join(modis, "cubic")
4040

4141
# Show some non-empty tiles
4242
rj.select('landsat', 'modis', 'crs', 'extent') \
@@ -53,6 +53,7 @@ The following optional arguments are allowed:
5353
* `right_extent` - the column on the right-hand DataFrame giving the [extent][extent] of the tile columns
5454
* `right_crs` - the column on the right-hand DataFrame giving the [CRS][CRS] of the tile columns
5555
* `join_exprs` - a single column expression as would be used in the [`on` parameter of `join`](https://spark.apache.org/docs/latest/api/python/pyspark.sql.html#pyspark.sql.DataFrame.join)
56+
* `resampling_method` - resampling algorithm to use in reprojection of right-hand tile columns. A string that is one of:nearest_neighbor, bilinear, cubic_convolution, cubic_spline, lanczos, average, mode, median, max, min, or sum.
5657

5758

5859
Note that the `join_exprs` will override the join behavior described above. By default the expression is equivalent to:

0 commit comments

Comments
 (0)