Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoTrellisRasterSource should return None on empty reads #3240

Merged
merged 2 commits into from
May 14, 2020

Conversation

pomadchin
Copy link
Member

@pomadchin pomadchin commented May 13, 2020

Overview

This PR removes a duplicate GeoTrellisRasterSource.sparseStitch function that also was not safe enough and could work (incorrectly) with empty inputs.

Checklist

Notes

This bug was revelaed during this issue investigation.

@pomadchin pomadchin force-pushed the fix/sparsed-stich branch from 9e78875 to 3e791a9 Compare May 13, 2020 22:46
tiles: Seq[(SpatialKey, MultibandTile)] with Metadata[TileLayerMetadata[SpatialKey]],
extent: Extent
): Option[Raster[MultibandTile]] = {
val md = tiles.metadata
Copy link
Member Author

@pomadchin pomadchin May 13, 2020

Choose a reason for hiding this comment

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

There was no tiles.isEmpty check, and anyway we don't need this function anymore, see #2903

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you comment a bit further on why we don't need this anymore? That linked issue + its links don't show where the original problem handling missing spatialkeys is addressed in the original sparsestitch function.

Copy link
Member Author

@pomadchin pomadchin May 14, 2020

Choose a reason for hiding this comment

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

@CloudNiner if you will look a bit above (at the place where it was used):

sparseStitch(tiles, extent) we can use the inbuilt function now tiles.sparseStitch(extent)

The issue #2903 was addressed in your PR here #3017 which is called "Add sparse stitch method to StitchCollectionMethods".

Copy link
Contributor

Choose a reason for hiding this comment

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

lol embarrassing -- I do in fact remember this now. 👍

CHANGELOG.md Show resolved Hide resolved
tiles: Seq[(SpatialKey, MultibandTile)] with Metadata[TileLayerMetadata[SpatialKey]],
extent: Extent
): Option[Raster[MultibandTile]] = {
val md = tiles.metadata
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you comment a bit further on why we don't need this anymore? That linked issue + its links don't show where the original problem handling missing spatialkeys is addressed in the original sparsestitch function.

@pomadchin pomadchin force-pushed the fix/sparsed-stich branch from f186d03 to c5635bd Compare May 14, 2020 12:47
@pomadchin pomadchin force-pushed the fix/sparsed-stich branch from c5635bd to 42c94b4 Compare May 14, 2020 12:47
@pomadchin pomadchin self-assigned this May 14, 2020
@pomadchin pomadchin merged commit 18b67fb into locationtech:master May 14, 2020
@pomadchin pomadchin deleted the fix/sparsed-stich branch May 14, 2020 14:05
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