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

Make baseTiff transient #230

Merged
merged 1 commit into from
Aug 12, 2019

Conversation

pomadchin
Copy link
Member

@pomadchin pomadchin commented Aug 12, 2019

Overview

Addresses #226 as well.
In some cases GeoTiffs would not be serializable due to having non serializable byte buffers.
Probably a better solution would be to improve GeoTiff class and make it serializable, so it is probably a temporary solution.

Closes #226

@@ -32,13 +32,13 @@ case class GeoTiffResampleRasterSource(
method: ResampleMethod = NearestNeighbor,
strategy: OverviewStrategy = AutoHigherResolution,
private[vlm] val targetCellType: Option[TargetCellType] = None,
private[vlm] val baseTiff: Option[MultibandGeoTiff] = None
@transient private[vlm] val baseTiff: Option[MultibandGeoTiff] = None
Copy link
Member Author

Choose a reason for hiding this comment

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

Since baseTiff is transient now, to prevent serialization issues; the following case can happen on shuffle:

val baseTiff: Option[MultibandGeoTiff] = null
Option(baseTiff).flatten //> None

@pomadchin pomadchin merged commit 4a791dc into geotrellis:master Aug 12, 2019
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.

RasterSources should be JavaSerializable
1 participant