by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 17 15:11
    echeipesh milestoned #3218
  • Sep 17 15:11
    echeipesh demilestoned #3218
  • Sep 17 14:54
    echeipesh assigned #3289
  • Sep 17 14:54
    echeipesh milestoned #3289
  • Sep 17 14:51
    echeipesh milestoned #3288
  • Sep 17 14:50
    echeipesh milestoned #3291
  • Sep 17 12:40
    pomadchin unlabeled #3280
  • Sep 17 12:40
    pomadchin edited #3280
  • Sep 17 12:39
    pomadchin edited #3280
  • Sep 17 00:21
    pomadchin synchronize #3294
  • Sep 16 23:04
    pomadchin synchronize #3294
  • Sep 16 22:33
    pomadchin commented #3218
  • Sep 16 22:11
    pomadchin edited #3294
  • Sep 16 22:09
    pomadchin assigned #3294
  • Sep 16 22:09
    pomadchin labeled #3294
  • Sep 16 22:09
    pomadchin opened #3294
  • Sep 16 19:55
    pomadchin labeled #3293
  • Sep 16 19:55
    pomadchin edited #3293
  • Sep 16 19:49
    laxiwuka opened #3293
  • Sep 16 18:47
    echeipesh closed #1565
Frank Dekervel
@kervel
ah, the push creates symlinks ?
Grigory
@pomadchin
symlinks? ah sowe had difficulties with publishing everything through a single sbt commands (memory / etc). sowe created a seaparate script that publishes everything into a local maven repository
James Cosford
@jamescosford
I've just come back to using geotrellis/vector after not touching it since 2.10, and I thought I would bring everything up to date with 3.1.0. Is that a good idea? Is there a good summary of changes somewhere? Feels like everything is miles from where it was.
Grigory
@pomadchin

hey @jamescosford you can get a high order summary from here: https://www.azavea.com/blog/2019/10/29/geotrellis-3-0-release/ also we have some release notes https://github.com/locationtech/geotrellis/releases/tag/v3.0.0 and we don’t have updated docs

the difference between 3.0 and 3.1 in a broken types hierarchy that was fixed in 3.1 and you probably won’t even notice it

James Cosford
@jamescosford
Thanks! I was stupidly looking at the master changelog and not the 3.0 branch changelog
I think I'm running into mostly locationtech/geotrellis#2932 stuff because I am using lots of JTS functionality
All of that high-overhead Scala wrapper stuff was really handy :D
Grigory
@pomadchin
yea; but we have some thin wrappers now around it; it was a reall mess always to convert between jts and our vector types :D
James Cosford
@jamescosford
I'm sure I will appreciate the improvements once I get rid of all these red squiggles. Thanks for the help, and all the hard work you guys have been doing.
Nathan Banek
@natonic77
I'm trying to produce a visual representation of a GeoTIFF that contains elevation data (or other dimensions, but elevation is a good example: something along the lines of the kind of visual illustration shown at the top of this page: https://library.carleton.ca/help/dem-formats). The raw underlying data does not naturally translate into a useful color range (or even grayscale) for rendering on the screen. I'm assuming I need to use a custom colorramp to make this work, but I'm a little lost as to where to begin. Anyone familiar with this sort of application and where I might learn more about how to get started?
Nathan Banek
@natonic77
Didn't exactly answer my own question about visualizing elevation data, but got closer. I used the built in ColorRamps in the library and got some decent results, but strangely I got different results for the same ColorRamp used with renderPng vs using it with renderJpg (renderJpg tended to be more muted than renderPng). Any idea why that would be?
Frank Dekervel
@kervel
is the rasterizer in geotrellis (geotrellis.raster.rasterize) elaborate enough to use as a simple tile renderer for vector data in postgis ? (there are tons of other options, but since i'm already using geotrellis ..)
Grigory
@pomadchin
@kervel I think it would work; @MahdiSMIDA did smth like that and visualized pointclouds using it https://gitter.im/geotrellis/geotrellis?at=5d95c2113220922ffb1e776d
Simeon H.K. Fitch
@metasim
@jamesmcclain are you still the lead guy on gdal_warp_bindings?
(about linkage rules on MacOS)
Grigory
@pomadchin
@metasim yep he is our lead guy here
:D
ha; interesting; so it assumes some to see some static paths?
Simeon H.K. Fitch
@metasim
Yeh.... which is a nice feature of OSX... when you want it.
There's some otool rpath trickery that allows you to manipulate it.
Nathan Banek
@natonic77

Found a potential problem in ColorMethods.toBufferedImage when used with a Byte-typed GeoTIFF. The current code passes the byte value of each cell as an integer to AWT's BufferedImage.setRGB call. This has the effect of populating the only Blue band in each cell resulting image, but it should have the effect of populating the R, G, and B bands in the raster (i.e. grayscale).

  def toBufferedImage: BufferedImage = {
    val bi = new BufferedImage(self.cols, self.rows, BufferedImage.TYPE_INT_RGB)
    cfor(0)(_ < self.cols, _ + 1) { x =>
      cfor(0)(_ < self.rows, _ + 1) { y =>
        bi.setRGB(x, y, self.get(x, y))
      }
    }
    bi
  }

Something like the byte-oriented version below would accurately convert the byte cells into full ARGB ints in the BufferedImage cells. Obviously, this could be done a little more cleanly within the library itself, but this is the workaround I am using in my own code.

          def byteToBufferedImage(t: Tile): BufferedImage = {
            val bi = new BufferedImage(t.cols, t.rows, BufferedImage.TYPE_INT_RGB)
            cfor(0)(_ < t.cols, _ + 1) { x =>
              cfor(0)(_ < t.rows, _ + 1) { y =>
                val byteVal = t.get(x, y)
                bi.setRGB(x, y, (0xFF << 24) | ((byteVal & 0xFF) << 16) | ((byteVal & 0xFF) << 8) | byteVal)
              }
            }
            bi
          }
Grigory
@pomadchin
I remember smth about it @metasim there was definitely smth with it; lets wait for @jamesmcclain comments
Simeon H.K. Fitch
@metasim
Sure... for now, I just need to document it.
Grigory
@pomadchin
hey @natonic77 so it is still related to the toJpg conversion?
I remember that you created an issue, can you post these thoughts into the issue as well?
Simeon H.K. Fitch
@metasim
We are finding that for some cell types, a.union(b) != b.union(a). We think it's a bug, but want to know what you think.
Grigory
@pomadchin
I wont expect that a.union(b) == b.union(a) when you have a function defined this way
Nathan Banek
@natonic77
@pomadchin I guess it is peripherally related. Two different problems, but both affect the JPEG output. I'll add it there.
Grigory
@pomadchin
@natonic77 yep, I think it is used (we used it) only for JPEG generation
hm @metasim but anyway; this can be a bug; what is the example of a union that doesnt work ‘as expected'?
Grigory
@pomadchin
@metasim you can even go deeper and make CellTypeSpec better :tada:
Simeon H.K. Fitch
@metasim
    println(UShortConstantNoDataCellType.union(UShortCellType) == UShortCellType.union(UShortConstantNoDataCellType))
'k
Grigory
@pomadchin
ha
it goes into the last branch of an if
Simeon H.K. Fitch
@metasim
Wanted to verify that our assumption taht it should be commutative was correct first.
Grigory
@pomadchin
dunno; im wondering what is the expectedoutput here?
it looks like in this case it always returns the argument:
def union(other: CellType): CellType =
    if (bits < other.bits)
      other
    else if (bits > other.bits)
      self
    else if (isFloatingPoint && !other.isFloatingPoint)
      self
    else
      other

Im okay that probably you may want println(UShortConstantNoDataCellType.union(UShortCellType) == UShortCellType.union(UShortConstantNoDataCellType))

but what is UShortConstantNoDataCellType.union(UShortCellType)? should always be UShortCellType I suppose

Go and file a bug! :D
It looks like should be ContantNoDataTypeCellType < CellType
eh
Simeon H.K. Fitch
@metasim
@vpipkt Had some good thoughts on this... I don't claim to know what's right here.
We were just having unexpected behavior in masking.
Grigory
@pomadchin
¯\_(ツ)_/¯ nice that you caught it
yea a good question, but naviely it feels for me that anything with a constant nodata celltype is just a special case of a common celltype (with some nodatada type / without it)
James McClain
@jamesmcclain
@metasim Sorry, I was in a meeting; I just joined the raster frames room. It looks as though the problem has been sorted?
Rob Knapen
@robknapen
@jamesmcclain Yes, seems to work after installing gdal with brew. It didn't find gdal installed with conda.