Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 23 22:13

    pomadchin on master

    Bump previous version for mima … (compare)

  • Nov 23 21:35

    pomadchin on master

    Move to the snapshot version (compare)

  • Nov 23 21:19

    pomadchin on v3.5.1

    (compare)

  • Nov 23 21:19

    pomadchin on master

    Update CHANGELOG (compare)

  • Nov 23 21:18

    pomadchin on v3.5.1

    (compare)

  • Nov 23 21:17

    pomadchin on v3.5.1

    (compare)

  • Nov 23 21:17

    pomadchin on master

    Update CHANGELOG (compare)

  • Nov 23 21:16

    pomadchin on v3.5.1

    (compare)

  • Nov 23 21:14

    pomadchin on 3.4.1

    (compare)

  • Nov 23 21:14

    pomadchin on v3.5.1

    (compare)

  • Nov 23 21:14

    pomadchin on 3.4.1

    (compare)

  • Nov 23 21:13

    pomadchin on master

    Version 3.5.1 (compare)

  • Nov 23 18:03

    CloudNiner on awf

    (compare)

  • Nov 23 18:03

    CloudNiner on master

    Update gdal-warp-bindings v1.1.… (compare)

  • Nov 23 18:03
    CloudNiner closed #3303
  • Nov 23 14:49
    pomadchin commented #3303
  • Nov 23 14:48
    pomadchin commented #3303
  • Nov 23 03:58
    lukestewart13 commented #3146
  • Nov 23 01:48
    lukestewart13 commented #3146
  • Nov 19 13:43
    CloudNiner commented #3303
Grigory
@pomadchin
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
Grigory
@pomadchin
@iceland1906 can you split manually your multipolygon into two polygons, parse them and check your function?
I think I know where is the problem but want to doublecheck the behavior
also will create an issue in a while
iceland1906
@iceland1906
sure
iceland1906
@iceland1906
@pomadchin it works if split the multipolygon into two seperate polygons
Simeon H.K. Fitch
@metasim
Unification with JTS geometry in GT 3.0 is awesome!
Only change I've had to do is delete any jtsGeom, except for on Extent, where I call toPolygon.
Was there consideration for making Extent an alias for Envelope?
(Mixed feelings about it myself)
Grigory
@pomadchin
@metasim there was, I don’t remember details, but AFAIK there is some sligh behavior differene between two of these // just lots of API changes
mb next release we’ll have only Envelope :shrug: mb @echeipesh remembers more
Eugene Cheipesh
@echeipesh
@metasim jts Envelope is supe heavy duty and mutable class and Extent is very heavily used throughout codebase. Basically it looked like it was introducing too much leakage and too much potential mutability.
Grigory
@pomadchin
@iceland1906 gotcha thanks! we have a corrupted json parser for multipolygons ):
will create an issue with details
iceland1906
@iceland1906
Nice! thanks for sorting this out! @pomadchin
Eugene Cheipesh
@echeipesh
@metasim that's not set in stone. If you think it would really simplify cliet code I'd be game to give it another shot for next release but basically we were in "this is not making things better for the few days we have to spend at this" category.
Grigory
@pomadchin
@iceland1906 suprsigingly it looks like it never worked
@echeipesh @metasim I’m totally fine with having both envelope and extents everywhere with extent being more restrcited but being simple and immutable; PostGIS also has two separate functions where ST_extent works with bbox and ST_envelope works with aribtrary geometries and can even work with lines / points