Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 04 10:38

    echeipesh on master

    Add toString and comments (#321… (compare)

  • Apr 04 10:38
    echeipesh closed #3217
  • Apr 04 10:37
    echeipesh synchronize #3217
  • Apr 04 10:35
    echeipesh synchronize #3200
  • Apr 03 18:44
    echeipesh synchronize #3217
  • Apr 03 18:40
    echeipesh edited #3217
  • Apr 03 18:07
    echeipesh synchronize #3217
  • Apr 02 19:23
    echeipesh assigned #3216
  • Apr 02 19:20
    echeipesh review_requested #3200
  • Apr 02 14:29
    pomadchin synchronize #3200
  • Apr 02 14:29
    pomadchin synchronize #3200
  • Apr 02 02:26
    pomadchin synchronize #3200
  • Apr 02 01:18
    pomadchin synchronize #3200
  • Apr 01 23:15
    pomadchin synchronize #3200
  • Apr 01 22:12
    pomadchin synchronize #3200
  • Apr 01 22:09
    pomadchin synchronize #3200
  • Apr 01 21:16
    pomadchin synchronize #3200
  • Apr 01 20:12

    echeipesh on spark3

    spark 3.0.0-preview2 (compare)

  • Apr 01 20:09
    echeipesh labeled #3218
  • Apr 01 20:09
    echeipesh opened #3218
Grigory
@pomadchin
cool let me see
thanks @metasim :tada:
@davidlandry93 yes it is a known bug, first of all try to update up to 3.0 it will write you a better exception :D but it looks like your initial CRS of the rasters you’re reprojecting is in incorrect CRS
for instance you have an extent is some UTM zone and it is in RDD with a LatLng CRS and you’re trying to reproject it into webmercator
@davidlandry93 locationtech/geotrellis#3083 and the related issue with a similar problem you had locationtech/geotrellis#3023
David Landry
@davidlandry93
@pomadchin I'll update to 3.0. I made the input RDD myself so I might have gotten mixed up in the CRS for sure.
My extent is valid to latlng though it you compare to this https://github.com/locationtech/geotrellis/issues/3023#issuecomment-534733560
Grigory
@pomadchin
@iceland1906 what is the CRS of these polygons?
David Landry
@davidlandry93
Extent(210.0, 40.0, 309.8999938964844, 69.94000244140625)
Grigory
@pomadchin
@davidlandry93 210 and 309 are problematic here O:
David Landry
@davidlandry93
Extents are lat lon lat lon?
Grigory
@pomadchin
in LatLng longs are in [-180, 180] & lats are in [-90, 90] degree ranges
David Landry
@davidlandry93
Ohhhhhh
iceland1906
@iceland1906
@pomadchin EPSG:32616
Grigory
@pomadchin
@iceland1906 ha this looks like a bug(?)
Will look closer into it today
iceland1906
@iceland1906
thanks @pomadchin
Grigory
@pomadchin
what is tileExtentPolygon.contains(pnt.jtsGeom)?
in your code above
and what is the type of shapePolygon?
ah nvm I think I fugred out how to reproduce ghe behavior you had
will create a unit test for it
iceland1906
@iceland1906
@pomadchin tileExtentPolygon.contains(pnt.jtsGeom) is just a condition to only show one tile in the target polygon, for demo purpose, not related with the issue
shapePolygon is geotrellis.vector.MultiPolygon type
Ricardo Yrupailla Meza
@stg101
Hi everyone, congratulations on 3.0 !
How can I save
a geotrellis.spark.TileLayerRDD[geotrellis.layer.SpatialKey] as a single tif file
?
btw I am starting to use geotrellis, so excuse me if the question is too simple.
iceland1906
@iceland1906
@stg101 try Section "Stiching Tiles into a single GeoTiff" at this link https://geotrellis.readthedocs.io/en/latest/guide/spark.html
Ricardo Yrupailla Meza
@stg101
Thanks I'm going to try that
I got the following error
[error]  No implicit view available from geotrellis.layer.SpatialKey => geotrellis.spark.tiling.TilerKeyMethods[geotrellis.layer.SpatialKey,geotrellis.layer.SpatialKey].
[error]       rdd.collectMetadata[SpatialKey](layoutScheme)
[error]
In this line
    val (_: Int, metadata: TileLayerMetadata[SpatialKey]) =
      rdd.collectMetadata[SpatialKey](layoutScheme)
Grigory
@pomadchin
hey @stg101 yea, but it depends on what do you want: you can stitch TileLayerRDD into a single raster and persist as a tiff (but it would trigger the entire rdd reduce on a driver) or you can group it by and save by chunks
what is the type of your RDD? during the collect metadata step rdd.collectMetadata
Ricardo Yrupailla Meza
@stg101
I would like to stitch the TileLayerRDD into a single raster
The type is geotrellis.spark.TileLayerRDD[geotrellis.layer.SpatialKey]
Grigory
@pomadchin
Yea so collectMetadata works only for RDD[ProjectedExtent, T]
you already have all metadata in rdd.metadata
the only thing you need to do is to call rdd.stitch and that is it
val rdd: TileLayerRDD[SpatialKey] = ???
val raster: Raster[Tile] = rdd.stitch
GeoTiff(raster, rdd.metadata.crs).write(“path/to/output.tiff”)
Ricardo Yrupailla Meza
@stg101
Thank you so much !
Grigory
@pomadchin
hey @iceland1906 how do you get your MultiPolygon? from geoJson?
iceland1906
@iceland1906
yes
polygonType match {
      case "Polygon" =>
        val polygon = jsonString.parseGeoJson[Polygon]
        val reprojectedPolygon = polygon.reproject(CRS.fromEpsgCode(polygonEpsg), CRS.fromEpsgCode(epsgCode))
        MultiPolygon(Array(reprojectedPolygon))
      case "MultiPolygon" =>
        val multiPolygon = jsonString.parseGeoJson[MultiPolygon]
        multiPolygon.reproject(CRS.fromEpsgCode(polygonEpsg), CRS.fromEpsgCode(epsgCode))
    }
Grigory
@pomadchin
gotcha
and what gt version do you use?
2.x?
(Im trying with 3.x the same issue is present)
iceland1906
@iceland1906
my version 2.2.0
Grigory
@pomadchin
gotcha