You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The source of the issue is running into cases where I needed to overrideGDALRasterSource and MosaicRasterSource methods for application specific reasons. However, that is not possible because GDALRasterSource is a case class and can't be extended and MosaicRasterSource is a trait and its constructor isn't accessible (more on this later).
Here is my list of reasons why our RasterSource should not be case class.
It is not a case class. Case class is supposed to be a named data container with light functionality, that has meaningful equality and can be matched against. RasterSource represents a set of rich I/O functionality and is basically the furthest thing from "data container".
Sometimes it's reasonable to override RasterSource methods. I don't know why exactly but changing the behavior under reproject or resample are at least two perfectly reasonable things to do. Why require creating an adapter?
Controlling toString. With as much crud as we shove into the conductors the case classtoString implementation becomes unhelpful.
The case class equality does not have a clear and unsurprising meaning for lots of RasterSources. Are two GeoTiffRasterSources equal only if they share the same baseTiff or if they point to the same source file with the same "view" (CRS/pixelGrid) of the data?
The text was updated successfully, but these errors were encountered:
The source of the issue is running into cases where I needed to
override
GDALRasterSource
andMosaicRasterSource
methods for application specific reasons. However, that is not possible becauseGDALRasterSource
is a case class and can't be extended andMosaicRasterSource
is a trait and its constructor isn't accessible (more on this later).Here is my list of reasons why our
RasterSource
should not be case class.RasterSource
represents a set of rich I/O functionality and is basically the furthest thing from "data container".unapply
:geotrellis-contrib/vlm/src/main/scala/geotrellis/contrib/vlm/avro/GeotrellisResampleRasterSource.scala
Line 46 in 07a5955
RasterSource
methods. I don't know why exactly but changing the behavior under reproject or resample are at least two perfectly reasonable things to do. Why require creating an adapter?toString
. With as much crud as we shove into the conductors thecase class
toString
implementation becomes unhelpful.baseTiff
or if they point to the same source file with the same "view" (CRS/pixelGrid) of the data?The text was updated successfully, but these errors were encountered: