pomadchin on master
In GDALDataset, lazy compute of… (compare)
LayerWriter.updatefunction to merge in the new data. The writer will check if the target tile exists and try to update it using the provided function. (Be warned the default implementation doesn't actually do any merging, so make sure to specify real value for
LayoutTileSourceif you give tell it how you want the tiles layed out (
LayoutDefinition) -- the
LayoutTileSourcewill both give you a set of keys you can read and allow you to actually read them lazilly.
TileUDT. So it depends on how much flexibility and which direction you need.
GDALDatasetin RasterFrames. The evaluation of various dataset's metadata is happening in parallel and I am un-scientifically seeing a lot of calls here to get the band min and max. I think this is forcing a lot of data reads that are ultimately unnecessary. Happy to elaborate. Would you be open to a PR trying to avoid this call if possible, as in most cases it is
import spray.json._ val resultpoly: List[PolygonFeature[Int]] = geotrellis.raster.vectorize.Vectorize(st.tile, st.extent) val jsons: JsValue = WithCrs(JsonFeatureCollection(resultpoly), NamedCRS("epsg:4326 ")).toJson No implicits found for parameter writer: JsonWrtier[Crs[JsonFeatureCollection]]
@metasim yes, to determine the celltype correctly we need
sampleFormat, bitsPerSample is number of bits per tiff sample, and the
sampleFormat is used to determin the ‘sing’ of values.
LIBTIFF exposes this information and in geotiff native jvm reader we also use this information to determine the cellType properly: https://github.com/locationtech/geotrellis/blob/7871e015129ae4a1ccfd06a23544a6de9ac68c6e/raster/src/main/scala/geotrellis/raster/io/geotiff/BandTypes.scala#L37
However GDAL doesn’t expose such information, or I didn’t find a proper way of doing it. Probably you can find smth in the GDAL C API and somehow get the information from the used driver about the raster cellType, but I’m not sure that it is possible to expose such information via GDAL
import geotrellis.spark._in the call scope. If you have it and function still doesnt work try to use
withGetBoundsMethod(rdd).getGridBoundsin your code, this at least will give you a readble compile time error.