locationtech / rasterframes

Geospatial Raster support for Spark DataFrames
http://rasterframes.io
Apache License 2.0
243 stars 46 forks source link

local map algebra functions with bands of different sizes #475

Closed Atika9 closed 4 years ago

Atika9 commented 4 years ago

when I try to run rf_local_add or rf_local_subtract functions with two bands of different sizes as a parameter, I get this error:

Caused by: geotrellis.raster.GeoAttrsError: Cannot combine rasters with different dimensions.(512,512) does not match (256,256) at geotrellis.raster.package$TileTupleExtensions.assertEqualDimensions(package.scala:144) ....`

vpipkt commented 4 years ago

This is expected behavior. You can use the rf_rescale function to make one of the tiles have the same dimension as the other.

@Atika9 let me know if this solves your issue.

Atika9 commented 4 years ago

@vpipkt Thank you. Yes, the problem is solved using rf_resample function.

vpipkt commented 4 years ago

@Atika9 I'll go ahead and mark the issue resolved. Feel free to @ me if you think we need to revisit it.