Skip to content

Fix MosaicRasterSource, GDALRasterSource and GeoTiffResampleRasterSource behavior - #3252

Merged
pomadchin merged 8 commits into
locationtech:masterfrom
pomadchin:fix/mosaic-rs
Jun 11, 2020
Merged

pomadchin merged 8 commits into
locationtech:masterfrom
pomadchin:fix/mosaic-rs

Conversation

@pomadchin

@pomadchin pomadchin commented Jun 9, 2020 •

Copy link
Copy Markdown
Member

Overview

This PR fixes:

  • MosaicRasterSources reprojection and resample logic
  • GDALRasterSource chained reprojection
  • GDALWarpOptions reprojection
  • GeoTiffRasterSource resample methods

Checklist

@pomadchin pomadchin changed the title Fix MosaicRasterSource reprojection [WIP] Fix MosaicRasterSource reprojection Jun 9, 2020
@pomadchin pomadchin changed the title [WIP] Fix MosaicRasterSource reprojection Fix MosaicRasterSource reprojection Jun 9, 2020
@pomadchin pomadchin changed the title Fix MosaicRasterSource reprojection Fix MosaicRasterSource and RasterSource reprojection behavior Jun 9, 2020
@pomadchin
pomadchin force-pushed the fix/mosaic-rs branch 2 times, most recently from 3855874 to 60b9945 Compare June 9, 2020 10:51
MosaicRasterSource(
sources map { _.reproject(targetCRS, resampleTarget, method, strategy) },
crs,
gridExtent.reproject(this.crs, targetCRS, Reproject.Options.DEFAULT.copy(method = method)),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gives an incorrect CellSize

Comment thread raster/src/main/scala/geotrellis/raster/MosaicRasterSource.scala Outdated
@pomadchin pomadchin changed the title Fix MosaicRasterSource and RasterSource reprojection behavior Fix MosaicRasterSource and GDALRasterSource reprojection behavior Jun 9, 2020
@pomadchin
pomadchin force-pushed the fix/mosaic-rs branch 2 times, most recently from 89daec1 to d841cb5 Compare June 10, 2020 02:30
@pomadchin pomadchin changed the title Fix MosaicRasterSource and GDALRasterSource reprojection behavior Fix MosaicRasterSource, GDALRasterSource, GeoTiffResample raster sources behavior Jun 10, 2020
Comment thread raster/src/main/scala/geotrellis/raster/MosaicRasterSource.scala

@CloudNiner CloudNiner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, although it appears there's a failing GDAL test on Scala 2.11 in CI that I couldn't reproduce locally.

Also good to add some docs before merging to MosaicRasterSource instance and apply methods that describe how and why you'd want to use each, e.g. needing to conform all rasters to a target grid extent.

@pomadchin
pomadchin force-pushed the fix/mosaic-rs branch 2 times, most recently from 7fe3249 to cc1d1f4 Compare June 10, 2020 22:50
@pomadchin pomadchin changed the title Fix MosaicRasterSource, GDALRasterSource, GeoTiffResample raster sources behavior Fix MosaicRasterSource, GDALRasterSource and GeoTiffResampleRasterSource behavior Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants