Questions tagged [geotrellis]
26 questions
5
votes
1 answer
Geotrellis, get the points that fall in a polygon grid Rdd
I need to calculate the average of the values of points that fall in a polygon grid.
Is like a join one to many based in condition Polyogon.contains(point)
//In:
val pointValueRdd : RDD[Feature[Point,Double]]
val squareGridRdd :…

user2232395
- 461
- 5
- 15
2
votes
1 answer
Adding a color gradient to GeoTiffs
Can you add a color gradient to GeoTiffs?
I am trying to do what is explained in Kernel Density
We already know that with a line like this:
kde.renderPng(kdeColorMap).write(“kde-buoy-waveHeight.png”)
we can write out a PNG with color…
But I can’t…

Paul Reiners
- 8,576
- 33
- 117
- 202
2
votes
1 answer
Scala, Spark, Geotrellis Rdd CRS reprojection
I load a set of point from a CSV file to a RDD:
case class yieldrow(Elevation:Double,DryYield:Double)
val points :RDD[PointFeature[yieldrow]] = lines.map { line =>
val fields = line.split(",")
val point =…

user2232395
- 461
- 5
- 15
2
votes
1 answer
GeoTrellis and GeoPySpark - TypeError: 'JavaPackage' object is not callable
I'm new to GeoTrellis, and had a question about the example script in the geopyspark readme: https://github.com/locationtech-labs/geopyspark.
Here's an abbreviated version of the script (we'll call it example.py):
import json
from functools import…

Charlie Lefrak
- 182
- 1
- 10
2
votes
1 answer
What's the easiest way to load single band Landsat 8 rasters from AWS and combine them into a single multiband RDD?
I'm using geotrellis to load geotiff rasters from Landsat 8 that are sitting on S3. However, they are stored on a per-band basis. I can use S3GeoTiff class to load individual bands, e.g.:
val options = S3GeoTiffRDD.Options(getS3Client = () =>…

dff
- 23
- 2
2
votes
1 answer
Dynamically determine aggregate KeyBounds in GeoTrellis
Given an RDD[(SpatialKey, Tile)] in GeoTrellis, how do I compute the aggregate KeyBounds[SpatialKey]?

metasim
- 4,793
- 3
- 46
- 70
2
votes
1 answer
How to fix missing SRS in geotiff using geotrellis
I have a bunch of geotiffs without SRS.
It is possible to fix the SRS using GDAL command:
gdal_translate -a_srs EPSG:25832 srcfile targetfile
How can I replace the GDAL command using geotrellis code ?

Viliam Simko
- 1,711
- 17
- 31
1
vote
1 answer
How to fix NPE when transforming RasterFrameLayer into Raster?
I'm trying to convert a predicted RasterFrameLayer in RasterFrames into a GeoTiff file after training a machine learning model.
When using the demo data Elkton-VA from rasterframes,it works fine.
But when using one cropping sentinel 2a tif with ndvi…

LyChow
- 11
- 1
- 4
1
vote
1 answer
GeoTrellis: Create an Attribute Store for a Cloud-Optimized GeoTIFF hosted outside of GeoTrellis
The strategic performance advantage of the Cloud-Optimized GeoTiff is the ability to retrieve raster data for a given extent while only pulling the overviews and a byte range from a remote resource.
In Python, the vsicurl and gdal.Warp abstractions…

Val H
- 507
- 4
- 13
1
vote
0 answers
How to analyze and limit the memory usage of geotrellis and spark for tiling
Our main goal is that we want to perform operations on a large amount of input data (around 80 GB). The problem is that even for smaller datasets, we often get java heap space or other memory related errors.
Our temporary solution was to simply…

FriendlyFruit
- 103
- 1
- 9
1
vote
1 answer
Java or scala, GeoTools or GeoTrellis, how to convert sentinel 2 data to Multiband geotif
I am trying to process Sentinel 2 data from (example)
http://sentinel-s2-l1c.s3-website.eu-central-1.amazonaws.com/#tiles/10/S/EG/2016/10/12/0/
The jp2 files are not georeferenced, and I need to put all the jp2 files as bands in a geotif. I have…

Mark Giaconia
- 3,844
- 5
- 20
- 42
1
vote
0 answers
Geotrellis, Need to perform a CascadedPolygonUnion of the same group cells
Hi I have a grid of 1600 square cells,
that previously classiffy given values to group: 0,1,2
val gridcells = RDD[(Int,geotrellis.vector.Polygon)] ...
where the Int is the group of the cell
Example:
(1,POLYGON ((317212 6275938, 317212 6275963,…

user2232395
- 461
- 5
- 15
1
vote
1 answer
Improving output when combining RGB channels on Landsat and converting to PNG
I'm using Scala and Geotrellis library to perform processing and analysis of Landsat-8 images, but when I tried to combine the bands 2, 3 and 4 (Red, Green and Blue) and here is the resulting multiband tiff (right) and png generated from it…

ardilgulez
- 1,856
- 18
- 19
0
votes
1 answer
WKB string to WKT, GeoJSON in Python
I have a number of WKB strings, couple of examples given below:
s1 =…

Tarique
- 463
- 3
- 16
0
votes
0 answers
how to use S3 with Geotrellis v3.6.3
Upgrading our 2019 Geotrellis library to v3.6.3 dropped the S3 clients our code uses particularly the S3RangeReader. I added in geotrellis-s3-spark which offers an entirely different set of classes leaving me a bit stumped. So now I'm trying to…

nullsteph
- 791
- 15
- 28