-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add a SourceName field into RasterSources #224
Add a SourceName field into RasterSources #224
Conversation
734e967
to
4b1e71c
Compare
4b1e71c
to
7c2897d
Compare
vlm/src/main/scala/geotrellis/contrib/vlm/effect/geotiff/BaseGeoTiffRasterSource.scala
Outdated
Show resolved
Hide resolved
@@ -39,18 +39,18 @@ import java.net.MalformedURLException | |||
* | |||
* @example "zip+s3://bucket/prefix/zipped-data.zip!data.tif" | |||
*/ | |||
case class GDALDataPath(path: String) extends DataPath | |||
case class GDALPath(value: String) extends SourcePath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
@@ -21,16 +21,17 @@ import java.net.URI | |||
/** | |||
* Represents the path to data that is to be read. | |||
*/ | |||
trait DataPath { | |||
trait SourcePath extends SourceName { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this makes a lot of sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only comment is to get rid of Base classes and inline them to avoid cluttering up the namespace. Otherwise this is a great improvement. It gets rid of RasterSourceMetadata
and solves the naming problem really efficiently. RasterSource extends RasterMetadata
RasterMetadata
has name: SourceName
and SourcePath extends SourceName
. So we can match on name
and work only on RasterMetadata
if required.
fea1719
to
272f2ad
Compare
Merging once CI is happy! |
272f2ad
to
062519e
Compare
062519e
to
0ad7e92
Compare
Overview
This PR allows
RasterSources
to have a name (or identifier) different from the path, for the in memory cases or for theMosaicRasterSource
that can't have a path to the source.Checklist
Closes #197