Repository navigation
Conversation
Refactors to KernelDensity.
…spatial-example Added example for translating from SpaceTimeKey to SpatialKey
…t tags to read, updated docs
…egistration Remove the Kryo registration requirement
…by already runing jobs on a runing cluster
…n/geotrellis into feature/collections-api # Conflicts: # accumulo/src/main/scala/geotrellis/spark/io/accumulo/AccumuloCollectionReader.scala
…-api-njoin Feature/collections api njoin
…ns-api Collections API
echeipesh
requested changes
Nov 3, 2016
| if (MultibandGeoTiff(path).tile.bandCount == 1) { | ||
| Left(SinglebandGeoTiff(path)) | ||
| } else { | ||
| Right(MultibandGeoTiff(path)) |
Contributor
There was a problem hiding this comment.
Here you're potentially reading the file twice
| } else { | ||
| Right(MultibandGeoTiff(path)) | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
We also should have overloads to build a GeoTiff from ProjectedTile
| def readMultiBand(path: String): MultibandGeoTiff = | ||
| MultibandGeoTiff(path) | ||
|
|
||
| def readSingleBand(path: String): SinglebandGeoTiff = |
Contributor
There was a problem hiding this comment.
should be readSingleband (lower case b) to be consistent with methods on the readers
…r MultibandGeoTiff
pomadchin
previously requested changes
Nov 3, 2016
| def apply(path: String): Either[SinglebandGeoTiff, MultibandGeoTiff] = { | ||
| val multiband = MultibandGeoTiff(path) | ||
| if (multiband.tile.bandCount == 1) { | ||
| Left(SinglebandGeoTiff(path)) |
Member
There was a problem hiding this comment.
Thanks for your contribution!
You don't actually need to read tiff from the source path again as you already read geotiff into memory using MultibandGeoTiff(path):
new SinglebandGeoTiff(multiband.tile.band(0), multiband.extent, multiband.crs, multiband.tags, multiband.options)
echeipesh
approved these changes
Nov 9, 2016
eclipsewebmaster
force-pushed
the
master
branch
from
November 25, 2016 16:29
f56000c to
e0b98d9
Compare
This was referenced Nov 26, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a method to GeoTiff.scala so that users can create GeoTiff objects without knowing whether they want a multiband or singleband geotiff. Also added functions to allow users to read multiband or singleband files without having a Multiband or Singleband Geotiff object.
Fixes #1757