by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:40

    pomadchin on rgba-color

    (compare)

  • 20:40

    pomadchin on master

    Fix NoData handling in the Colo… (compare)

  • 20:40
    pomadchin closed #3278
  • 20:40
    pomadchin closed #3203
  • 13:35
    pomadchin review_requested #3278
  • 08:29
    wenjunzhangp commented #3277
  • Aug 03 19:31
    pomadchin review_requested #3273
  • Aug 03 19:31
    pomadchin review_requested #3275
  • Aug 03 19:16
    pomadchin commented #3203
  • Aug 03 18:30
    pomadchin synchronize #3278
  • Aug 03 18:30

    pomadchin on rgba-color

    Fix JPEG render (compare)

  • Aug 03 18:29
    pomadchin synchronize #3278
  • Aug 03 18:29

    pomadchin on rgba-color

    Fix JPEG render (compare)

  • Aug 03 18:09
    pomadchin assigned #3278
  • Aug 03 18:09
    pomadchin commented #3203
  • Aug 03 18:08
    pomadchin assigned #3203
  • Aug 03 18:02
    pomadchin edited #3278
  • Aug 03 18:01
    pomadchin synchronize #3278
  • Aug 03 18:01

    pomadchin on rgba-color

    Fix JPEG render (compare)

  • Aug 03 14:39
    pomadchin labeled #3276
jsmoreau
@jsmoreau
Is it possible to pass a custom worldExtent to use to the ZoomedLayoutScheme?
Grigory
@pomadchin
@jsmoreau nope, but I think as a workaround, you can create your own tiling scheme and pass it into functions
hmmmm
so you say that epsg:3979 reprojection works bad for you?
I am just afraid that this can be a proj4j bug :/ and in this case it can be a bit more global bug with this projection
let me see
p/s/ we also accept PRs against proj4j repo => it turned out that we’re maintaining it as well, so feel free to ask questions about it in this channel too
I found a single test case:
"4326 -> 3979","passing","EPSG","4326","EPSG","3979","1.0","-1.0","0.0","1.1394567715938E7","3952432.439572","0.0","0.100000","0.100000","0.100000","","","","Auto-generated from proj.4 epsg database”
converting latlng to 3979
mb it is a false positive test case?
Mahdi SMIDA
@MahdiSMIDA
@pomadchin it's white raster even in QGIS
image.png
Grigory
@pomadchin
@MahdiSMIDA hey hm
this is weird
jsmoreau
@jsmoreau

@pomadchin I don't think proj4 is the problem. I did a simple test where is simply read a UTM tif and reproject it to LCC.

    val geoTiff: SinglebandGeoTiff = GeoTiffReader.readSingleband(inputPath)
    val r: Raster[Tile] = geoTiff.raster

    val utm: CRS = CRS.fromEpsgCode(2962)
    val lcc: CRS = CRS.fromEpsgCode(3979)

    val repro: Raster[Tile] = r.reproject(utm, lcc)

    GeoTiff(repro, lcc).write(s"${outputPath}/${System.currentTimeMillis}.tif")

The output file is fine.

Grigory
@pomadchin
@jsmoreau but you said smth about the worldExtent?
the world extent reprojection was incorrect?
jsmoreau
@jsmoreau

@pomadchin There is also a reprojection when the worldExtent is calculated as part of the ZoomedLayoutScheme instanciation. This code gets called:

/**
  * This package is concerned with translation of coordinates or extents between
  * geographic extents and the grid space represented by SpatialKey(col, row) coordinates,
  * the layout that defines that grid space, as well as functionality for cutting tiles into
  * a uniform grid space.
  */
package object tiling {
  private final val WORLD_WSG84 = Extent(-180, -89.99999, 179.99999, 89.99999)

  implicit class CRSWorldExtent(crs: CRS) {
    def worldExtent: Extent =
      crs match {
        case LatLng =>
          WORLD_WSG84
        case WebMercator =>
          Extent(-20037508.342789244, -20037508.342789244, 20037508.342789244, 20037508.342789244)
        case Sinusoidal =>
          Extent(-2.0015109355797417E7, -1.0007554677898709E7, 2.0015109355797417E7, 1.0007554677898709E7)
        case _ =>
          WORLD_WSG84.reproject(LatLng, crs)
      }
  }
}

The CRS I use is LCC so the line that gets called is

case _ =>
          WORLD_WSG84.reproject(LatLng, crs)

But I don't think the WORLD_WSG84 bounds are valid for LCC. LCC is a North american projection and covers only this part of the world. I think that is why weird coordinates result from the transformation.

Grigory
@pomadchin

@jsmoreau thanks for looking into it. can you create an issue in order not to forget it?
there are two possible ways to resolve it:

  1. to add into the api a way to pass the world extent
  2. to add here a case that will work differently for the LCC projection

You can also create a new instance of ZoomedLayoutExtent and to use a different world extent from crs function implementation / that will be a prototype that will know how to use a passed global extent

@MahdiSMIDA I think I know what is going on, probably you are trying to render a layer at 0 zoom level
@MahdiSMIDA instead of resultat.stitch use layer.stitch
jsmoreau
@jsmoreau
@pomadchin I will create an issue. In the mean time, I created a custom ZoomedLayoutScheme that uses the expected worldExtent for LCC. It seems to work so far.
Grigory
@pomadchin
@jsmoreau perfect! thanks for looking into it; would you share your zoomed layout scheme as well in the issue body?
Mahdi SMIDA
@MahdiSMIDA
Zoom is the pixels number in the raster?
Mahdi SMIDA
@MahdiSMIDA
image.png
Thanks to ur help @pomadchin i made it :D
Grigory
@pomadchin
@MahdiSMIDA GZ!
Zhiyuan Liu
@Silence-Soul
@pomadchin Is single-band rendering the same way as multi-band? Or does it have its own rules?
Grigory
@pomadchin
yo @Silence-Soul what do you mean by that?
it is +- the same
but deoends on what do you ask in particular?
is your question how differnet multiband rendering is differnet from multiband into a png raster?
Zhiyuan Liu
@Silence-Soul
I am very sorry, my ability to describe the problem in English is too bad. When I sort out my problem, I am asking.
Grigory
@pomadchin
it is different in the sense of colors interpretation; multiband png ~ it would try to interpret mulitband tile as and RGB image and would try to merge it into a single band taking into account that it whould be a colored image
if it is a singleband - it always means a grayscaled image (+) color ramp
Mahdi SMIDA
@MahdiSMIDA
@pomadchin i have one last question about the algorithm. with this TinToDem we rasterize Max, Min or the AVG points ? and how can i fix that for example to rasterize only max points of tunnel's pointcloud
Grigory
@pomadchin
Its only an interpolation over the Z coordinate
What do you want to do? Do you want to filter the dataset and to rasdterize only max points?
Simeon H.K. Fitch
@metasim
If I'm using GeoTrellis 2.x, is geotrellis-contrib-gdal version 2.12.0 the latest?
Grigory
@pomadchin
@metasim looks like it
Simeon H.K. Fitch
@metasim
Thanks!
Jan Van den bosch
@bossie
Hi all. Has GT 2.3.3 been released? Is there a changelog?
Grigory
@pomadchin
it was mostly a critical fixes release: slow CRS instances creation / comparison & fixed a logger shading problem that could cause issues
Ron DeFreitas
@rdefreitas
Does anyone have a link to the conus grids converted for use with proj4j?
Holmesdt
@Holmesdt
Quick question, I am using the reproject method on a ContextRDD. The source CRS is 4326 and the destination CRS is 32635. For some reason, the final CRS ends up as 4037 instead of 32635. Any ideas as to why this occurs?
Grigory
@pomadchin
hey @Holmesdt can you share some code you’re trying to run?
Holmesdt
@Holmesdt
Sure @pomadchin