Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 02 02:54
    pomadchin commented #3489
  • Dec 02 02:53
    pomadchin commented #3489
  • Dec 02 02:53
    pomadchin commented #3489
  • Dec 02 02:24
    imperio-wxm commented #3489
  • Nov 30 15:14
    pomadchin commented #3489
  • Nov 30 15:11
    pomadchin commented #3489
  • Nov 30 15:11
    pomadchin commented #3489
  • Nov 30 15:11
    pomadchin commented #3489
  • Nov 30 15:10
    pomadchin commented #3489
  • Nov 30 15:10
    pomadchin labeled #3489
  • Nov 30 15:10
    pomadchin labeled #3489
  • Nov 30 15:09
    pomadchin commented #3489
  • Nov 30 12:01
    imperio-wxm edited #3489
  • Nov 30 11:55
    imperio-wxm opened #3489
  • Nov 26 17:37
    pomadchin synchronize #3487
  • Nov 26 17:37
    pomadchin synchronize #3487
  • Nov 21 09:10
    jdries opened #3488
  • Nov 11 03:24
    pomadchin commented #3487
  • Nov 11 03:24
    pomadchin commented #3487
  • Nov 11 03:24
    pomadchin commented #3487
Grigory
@pomadchin
hey @epursiai I think it can be the circe library version mismatch
try to shade it in your artifacts
Grigory
@pomadchin
We can also roll a GT release with the fresh circe version
do you know which version is needed for the Databricks runtime?
Eetu Pursiainen
@epursiai
I'll try to exclude circe from the dependencies and use what's provided in the runtime, and I'll let you know if it works. Unfortunately I have no clue what the version there is. I can try to find out. :)
Grigory
@pomadchin
@epursiai yes please! that would be very much welcome
I think shading can be a better approach
Eetu Pursiainen
@epursiai
Probably will need to do that for circe-core, circe-generic and circe-parser all?
Grigory
@pomadchin
try to shade the entire io.circe package
Eetu Pursiainen
@epursiai
Yeah, I'll try to do that. I'll update this issue tomorrow.
Grigory
@pomadchin
:+1: thank you
santocp94
@santocp94

hey @pomadchin I'm sorry but I'm still having some trouble with my mosaic task :( . I wrote this starting from your suggestion:

  val firstTiff = GeoTiffReader
    .readSingleband("...")
  val combinedExtent = firstExtent.expandToInclude(secondExtent)
  val re = RasterExtent(combinedExtent, firstTiff.cellSize)

  val newRaster = Raster(ArrayTile.alloc(firstTiff.cellType, re.cols, re.rows), re.extent)
  val mergedRaster = newRaster.merge(Raster(firstRaster.tile, firstExtent))

I can't understand why but the merge function with that configuration is not resolved. I tried with other two rasters read form files and the function is correctly resolved. The only difference I noticed between the created raster and the read ones is that the geotrellis.raster.DoubleUserDefinedNoDataArrayTile produces a merge while the read raster have a inner geotrellis.raster.io.geotiff.Float64GeoTiffTile. Did I mess up something with imports and packages?
Thanks in advance

Grigory
@pomadchin
hey @santocp94 what to you mean by not correctly resolved?
caoguangshun
@caoguangshun
ok @pomadchin ,i have sovled the problem referring to your test code in the github. and i add a configuration file in resource folder .as following
Grigory
@pomadchin
@caoguangshun great!
santocp94
@santocp94

hey @santocp94 what to you mean by not correctly resolved?

I tried with different configurations but an error occurred:

value merge is not a member of geotrellis.raster.Raster[geotrellis.raster.MutableArrayTile]

or

value merge is not a member of geotrellis.raster.Raster[geotrellis.raster.ArrayTile]
Grigory
@pomadchin
@santocp94 try to cast internals of the Raster to MultibandTile
if that would not work, check if withMultibandRasterMergeMethod(raster).merge works
but I bet this is due to types mismatch
MutableArrayTile is kind of a dangerous type (:
I’m surprised that it didn’t work with ArrayTile
looks like some imports hell.
santocp94
@santocp94
Looks like I can't just cast it: Exception in thread "main" java.lang.ClassCastException: class geotrellis.raster.DoubleUserDefinedNoDataArrayTile cannot be cast to class geotrellis.raster.MultibandTile
and I'm actually failing to import withMultibandRasterMergeMethod. I also tried to re-import everything from scratch but the problem persists
Grigory
@pomadchin
@santocp94 well yes, DoubleUserDefinedNoDataArrayTile can be cast to Tile
it is not a MultibandTile (:
@santocp94 what are your imports?
import geotrellis.raster._ should be able to get it into the scope
If that doesn’t happen - than or implicits are wrong or smth else is happening in your codebase
The last resort could be to use it directly from geotrellis.raster.merge.Implicits._ but I can recommend it only for test / dev purposes
Eetu Pursiainen
@epursiai
Hmm. So excluding circe from dependencies when installing Geotrellis in Databricks didn't work, as then those needed circe classes were not found at all. Since I'm not really a experienced Java/Scala dev, I'm wondering what's the easiest way to create a proper uber jar, or to shade those circe dependencies...
Grigory
@pomadchin

@epursiai just create an uber jar and shade them; check out https://github.com/sbt/sbt-assembly#shading

we usually use sbt-assembly plugin for these purposes; The example of usage in the gt build code is here https://github.com/locationtech/geotrellis/blob/master/project/Settings.scala#L559-L569

So in your case along with the circe rule you would need shapeless and cats kernel shading:

ShadeRule.rename("io.circe.**" -> s”$shadePackage.io.circe.@1").inAll
ShadeRule.rename("shapeless.**" -> s"$shadePackage.shapeless.@1").inAll,
ShadeRule.rename("cats.kernel.**" -> s"$shadePackage.cats.kernel.@1").inAll
yang162132
@yang162132
'./scripts/server --ndvi
Starting geotrellis-server-450_ndvi-example_1 ... done
Attaching to geotrellis-server-450_ndvi-example_1
ndvi-example_1 | Error: Could not find or load main class geotrellis.server.example.ndvi.NdviServer
geotrellis-server-450_ndvi-example_1 exited with code 1
' what's wrong
Grigory
@pomadchin
hey @yang162132 what are you trying to do?
what repo it is and what’s happening there
yang162132
@yang162132
Grigory
@pomadchin
oooooh I see; I think I haven’t properly updated the docker compose file
for now I think it would be more stragihtforward to:
$ sbt
$ project example
$ // run
chdsb
@chdsb
Hey,i'm beginner of geotrellis,I have some simple questions.
1.when i use "polygonalHistogramDouble" method,i always get 80 points but which should be more.
2.not only get the vaule of raster,but i also want get the Longitude and latitude of the.what should i do?Calculating from tile extent?
3.how can i choose tile level by myself,rather then calculat automaticly by tilesize in "ZoomedLayoutScheme"(for example,i want keep 256*256 resolving power,and make 0 to 19 level's tile)
Thanks
Grigory
@pomadchin

Hey @chdsb I don’t think we have polygonalHistogramDouble method anymore; we have a general polygonalSummary API with visitors passed inside that can be controlled by you

https://github.com/locationtech/geotrellis/blob/master/spark/src/main/scala/geotrellis/spark/summary/polygonal/RDDPolygonalSummary.scala

about 2. I don’t really get the question: do you want to get coordinates of a certain pixel of a tile? yes you need the tile extent and its resolution:
RasterExtent(extent, cellSize).gridToMap(col, row) // the result is a tuple of geospatial coordinates in the extent projection
Also I’m responding in terms of the GT 3.6.0
yang162132
@yang162132
Hey @pomadchin What's the difference between ValueReader and LayerReader in geotrellis
Grigory
@pomadchin
Hey @yang162132 ; value reader allows to access tiles by Key; LayerReaders allow to operate with tile collections; checkout APIs of both!
Max
@Max-AR
Has anyone sucessfully used graalvm with geotrellis?
Grigory
@pomadchin
Hey @Max I actually haven’t tried but may work; what issues do you have when using it as a runtime?
* not talking about native image
Max
@Max-AR
I haven'
t tried at the moment, I was thinking of ways to eek out more performance. In the project I am working right now I have some libs using reflection based DI that need to be removed first