Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 01 17:33

    pomadchin on master

    Pass baseTiff to new RasterSour… (compare)

  • Oct 01 17:33
    pomadchin closed #3485
  • Sep 29 20:29
    kervel synchronize #3485
  • Sep 29 19:39
    kervel edited #3485
  • Sep 29 19:34
    kervel synchronize #3485
  • Sep 28 16:38
    pomadchin edited #3485
  • Sep 28 08:18
    kervel opened #3485
  • Sep 28 08:16
    kervel closed #3484
  • Sep 28 07:48
    kervel synchronize #3484
  • Sep 28 07:35
    kervel opened #3484
  • Aug 15 20:42
    moradology ready_for_review #3482
  • Aug 15 20:41
    moradology edited #3482
  • Aug 15 20:41
    moradology edited #3482
  • Aug 15 20:41
    moradology synchronize #3482
  • Aug 09 13:07
    pomadchin closed #3335
  • Aug 09 13:07
    pomadchin closed #3481
  • Aug 09 13:07

    pomadchin on master

    Test storage method for tiff wr… (compare)

  • Aug 09 13:05

    pomadchin on master

    liftCompletableFuture function … (compare)

  • Aug 09 13:05
    pomadchin closed #3483
  • Aug 09 03:15
    pomadchin synchronize #3483
Grigory
@pomadchin
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
If I end up getting around to it I'll post back here for sure
Grigory
@pomadchin
@Max you’re probably talking about native image - yea this one would not work; but you may try graalvm; there are articles in the wild that demonstrate some benefits of Spark + Graal
yang162132
@yang162132
klmc66666
@klmc66666
@pomadchin geotrellis is support read and write webp format?
Grigory
@pomadchin
Hey @yang162132 could you drop here the stack trace?
hello @klmc66666 only reading and only via GDAL
yang162132
@yang162132
java.util.NoSuchElementException: Either.right.get on Left
at scala.util.Either$RightProjection.get(Either.scala:640)
at geotrellis.server.example.ndvi.NdviService.$anonfun$redQueryParamDecoder$1(NdviService.scala:55)
at cats.data.Validated.map(Validated.scala:559)
at org.http4s.QueryParamDecoder
KaTeX parse error: Can't use function '$' in math mode at position 5: anon$̲7.decode(QueryP…: anon$7.decode(QueryParam.scala:205)
    at org.http4s.dsl.impl.QueryParamDecoderMatcher.$anonfun$unapply$3(Path.scala:327)
    at scala.Option.flatMap(Option.scala:271)
    at org.http4s.dsl.impl.QueryParamDecoderMatcher.unapply(Path.scala:327)
    at geotrellis.server.example.ndvi.NdviService
anonfun$routes$1.applyOrElse(NdviService.scala:75)
at geotrellis.server.example.ndvi.NdviService$$anonfun$routes$1.applyOrElse(NdviService.scala:73)
at scala.PartialFunction$Lifted.apply(PartialFunction.scala:228)
at scala.PartialFunction$Lifted.apply(PartialFunction.scala:224)
at org.http4s.HttpRoutes$.$anonfun$of$2(HttpRoutes.scala:79)
at $anonfun$combineK$1 @ org.http4s.syntax.KleisliResponseOps.$anonfun$orNotFound$1(KleisliSyntax.scala:49)
at getOrElse @ org.http4s.syntax.KleisliResponseOps.$anonfun$orNotFound$1(KleisliSyntax.scala:49)
at main$ @ geotrellis.server.example.ndvi.NdviServer$.main(NdviServer.scala:33)
@pomadchin
Grigory
@pomadchin
@yang162132 oh I see, the incorrect format of inputs
yang162132
@yang162132
Oh, the uri or json ?
Grigory
@pomadchin
I think it expects JSONS as an input
yea indeed also getting it
ava.util.NoSuchElementException: Either.right.get on Left
    at scala.util.Either$RightProjection.get(Either.scala:640)
    at geotrellis.server.example.ndvi.NdviService.$anonfun$redQueryParamDecoder$1(NdviService.scala:55)
    at cats.data.Validated.map(Validated.scala:559)
    at org.http4s.QueryParamDecoder$$anon$7.decode(QueryParam.scala:205)
    at org.http4s.dsl.impl.QueryParamDecoderMatcher.$anonfun$unapply$3(Path.scala:327)
    at scala.Option.flatMap(Option.scala:271)
    at org.http4s.dsl.impl.QueryParamDecoderMatcher.unapply(Path.scala:327)
    at geotrellis.server.example.ndvi.NdviService$$anonfun$routes$1.applyOrElse(NdviService.scala:75)
    at geotrellis.server.example.ndvi.NdviService$$anonfun$routes$1.applyOrElse(NdviService.scala:73)
    at scala.PartialFunction$Lifted.apply(PartialFunction.scala:228)
    at scala.PartialFunction$Lifted.apply(PartialFunction.scala:224)
    at org.http4s.HttpRoutes$.$anonfun$of$2(HttpRoutes.scala:79)
    at $anonfun$combineK$1 @ org.http4s.syntax.KleisliResponseOps.$anonfun$orNotFound$1(KleisliSyntax.scala:49)
    at getOrElse @ org.http4s.syntax.KleisliResponseOps.$anonfun$orNotFound$1(KleisliSyntax.scala:49)
    at main$ @ geotrellis.server.example.ndvi.NdviServer$.main(NdviServer.scala:33)
btw aside of having an exception here; you have smth with your deps / jvm classpath:
KaTeX parse error: Can't use function '$' in math mode at position 5
that is not smth we bring into GT; that is smth on your host
It expects JSONs as inputs into arguments
not links to jsons
Grigory
@pomadchin
but be careful with percent ecndoing; passing jsons as arguments is not the best design decision :D
you can hijack the code and pass it inside manually for test purposes
Oh I see
Grigory
@pomadchin
have you resolved it?