Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:52
    pomadchin labeled #3186
  • 16:31
    marygriffus opened #3186
  • Feb 16 03:52
    zxhcodes closed #3185
  • Feb 16 03:52
    zxhcodes commented #3185
  • Feb 16 02:49
    pomadchin commented #3185
  • Feb 16 02:48
    pomadchin commented #3185
  • Feb 16 02:48
    pomadchin commented #3185
  • Feb 16 02:37
    zxhcodes edited #3185
  • Feb 16 02:29
    zxhcodes edited #3185
  • Feb 16 02:29
    zxhcodes opened #3185
  • Feb 14 17:29
    pomadchin commented #3184
  • Feb 14 17:25
    metasim commented #3184
  • Feb 14 17:24
    pomadchin commented #3184
  • Feb 14 17:22
    metasim commented #3184
  • Feb 14 17:22
    metasim commented #3184
  • Feb 14 17:21
    metasim commented #3184
  • Feb 14 17:17
    pomadchin commented #3184
  • Feb 14 17:17
    pomadchin commented #3184
  • Feb 14 17:16
    pomadchin commented #3184
  • Feb 14 16:51
    pomadchin commented #3184
Simeon H.K. Fitch
@metasim
Ouch... what a PITA!
Grigory
@pomadchin
yea, without this ‘conversion function’ GDALRasterSource and all GeoTrellis types would behave really differently
Simeon H.K. Fitch
@metasim
I knew it was in GeoTIFF based on the JVM reader.
Surprised GDAL didn't handle it more gracefully.
Grigory
@pomadchin
they just use different types for tiffs
Simeon H.K. Fitch
@metasim
I'd have expected the NoData handling part... makes sense
I think @vpipkt has a workaround that will keep min/max from being computed for all other cell types (because the parameter is call-by-name), but still still happen for byte types.
Grigory
@pomadchin
¯\_(ツ)_/¯ I would recommend also to doubleck the GDAL API - mb there is smth we can pull this information from
Simeon H.K. Fitch
@metasim
will do
After I finish the GT 3.x upgrade ;-)
Grigory
@pomadchin
: D
yo @kervel to make this function work you need only to have import geotrellis.spark._ in the call scope. If you have it and function still doesnt work try to use withGetBoundsMethod(rdd).getGridBounds in your code, this at least will give you a readble compile time error.
Jason T Brown
@vpipkt
My reading of this GDAL doc is that there will never be a signed Byte type. And that would mean that the first case here is always true and the second is never evaluated?
we have a bit more rich typesystem; it is wider than what GDAL Provides
also we just store data differently; we don’t have unsugned types in java (: so any byte tiff is by default in [-128; 127] ranges; and UByte allows to interpret them as [0..255] values
Grigory
@pomadchin
ha @vpipkt mb you’re right
Frank Dekervel
@kervel
@pomadchin I know where the error is coming from.. the withGetBoundsMethod Class takes the rdd as instance variable, and needs to be serializable because of this
Grigory
@pomadchin
Ah….. nd value probably can be below zero… because we don’t have ubytes
but still check it i.e. what if NoData Value=255
Frank Dekervel
@kervel
Just like the other implicit classes in the same file, which already are.
Grigory
@pomadchin
@kervel mb; do you have serialziation issues?
Frank Dekervel
@kervel
Yes. But the fix is simple
Grigory
@pomadchin
Nice! would you like to create a PR with marking this implicit class as serializable?
Frank Dekervel
@kervel
Ok.
Grigory
@pomadchin
:100:

It would be awesome if you could sign an ECA https://github.com/locationtech/geotrellis/blob/master/docs/CONTRIBUTING.rst#eclipse-contributor-agreement-eca

after that commit changes via git commit -s -m “commit message” command

Frank Dekervel
@kervel
Ok.
Jason T Brown
@vpipkt
@pomadchin i am not sure how to proceed, but my understanding is that since GDAL's type system is narrower, a GDT_Byte should always result in either UByteCellType, UByteUserDefinedNoDataCellType or UByteConstantNoDataCellType
the function as called will never return a BitCellType either because no typeSizeInBits is passed
(at least as called in this context)
Jason T Brown
@vpipkt
@pomadchin happy to keep the discussion going on this PR: locationtech/geotrellis#3150
Grigory
@pomadchin
@vpipkt can you cover it with test? so we would know that GDALRasterSource behaves the same way GeoTiffRasterSource does
Simeon H.K. Fitch
@metasim
If I have, say, an RDD[ProjectedRaster[Int]] (heterogeneous in CRS) and want to write them all out to HDFS, isn't there an "unstructured cog writer" feature in GT?
Or rather, is that the right/best option?
I don't want to reproject anything or resample it into a new grid.
Grigory
@pomadchin
@metasim nope we didn’t solve it :s
There it still a problem how would you collect metadata of multiple raster sources
Simeon H.K. Fitch
@metasim
Did you do some experimental work on it?... seem to remember some code somewhere ages ago....
Simeon H.K. Fitch
@metasim
where you were writing out debugging vrt files? or am I making that up.
Grigory
@pomadchin

@metasim we didnt resolve that; imagine the case that you have multiple RasterSources
you want to figure out how to tile them to some layout in some projection…

it would mean that you probably need to collect metadata in some CRS or reprojet it into some CRS to have some idea of the entire rasters list extent

ahhhh youre talking about persisting
and not about reading
hmmm can you describe your usecase a lil bit more?
Im jsut flygin in a different context at the moment
Simeon H.K. Fitch
@metasim
yeh, sorry. Say you want to write out a bunch of DL chips as geotiffs, organized via some arbitrary partitioning scheme. Maybe some json sidecars for metadata (or not).
BTW, progress is being made: https://circleci.com/gh/s22s/rasterframes/1757

@pomadchin

yeh, sorry. Say you want to write out a bunch of DL chips as geotiffs, organized via some arbitrary partitioning scheme. Maybe some json sidecars for metadata (or not).

Another way of looking at it (from a RasterFrames perspective) is how might I write out unstructured tiles in a form that's not, say Parquet or ORC... some form that could be slurped up by other tooing.

Not really a hard lift... just wondering if you'd gone down that path before.
Nathan Banek
@natonic77

I'm trying to render a GeoTIFF as PNG, but don't know a priori if it is single or multi band. Getting an assertion failure on color when I attempt renderPng if I don't do the following:

val gt = GeoTiffReader.readMultiband("my.tif")
gt.bandCount match {
    case 1 => gt.tile.band(0).renderPng.write("my.png")
    case i if i > 1 => gt.tile.renderPng.write("my.png")
}

I'm a GT newbie, so I'm sure overlooking something obvious, but is there not a single mechanism through the API to render an n-band GeoTIFF?