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

Read Multiplex Band Support #698

Merged

Conversation

jbouffard
Copy link
Collaborator

@jbouffard jbouffard commented Dec 5, 2018

This PR adds multiplex band support to the TiledRasterLayer.read method. Now, it'll be possible to read in separate files as a single multiband. This is useful in cases where individual bands are split into separate files. In addition to combing multiple bands into a single tile, it's also possible to specify their order. In order to support band multiplexing, a new type: SourceInfo has been created.

Note: This PR depends on an unmerged PR: geotrellis/geotrellis-contrib#111 to work.

Copy link
Collaborator

@echeipesh echeipesh left a comment

Choose a reason for hiding this comment

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

There is a major logic problem with the implementation that would yield incorrect results for non-trivial cases. The test does not reveal it because it uses only two files as input. This input is small enough that they will never be split by a partition.

Although a little outdated now here is an example of a required approach:

  • Generate RasterRegions per SpatialKey
  • perform shuffle by key to co-locate all spatially overlapping input
  • "sort" RasterRegions by key to get the right band order.

@jbouffard jbouffard changed the title Read Multiplex Band Support [WIP] Read Multiplex Band Support Feb 1, 2019
@jbouffard jbouffard changed the title [WIP] Read Multiplex Band Support Read Multiplex Band Support Feb 1, 2019
…g is done when reading in and formatting the data
@jbouffard jbouffard force-pushed the improvement/read-multiplex branch from f8c2538 to b4783bc Compare February 21, 2019 19:41
@jbouffard jbouffard merged commit f9ed926 into locationtech-labs:master Feb 21, 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.

2 participants