GeoTrellis is a geographic data processing engine for high performance applications.
pomadchin on master
Bump dependencies versions up (… (compare)
@metasim we didnt resolve that; imagine the case that you have multiple RasterSources
you want to figure out how to tile them to some layout in some projection…
it would mean that you probably need to collect metadata in some CRS or reprojet it into some CRS to have some idea of the entire rasters list extent
@pomadchin
yeh, sorry. Say you want to write out a bunch of DL chips as geotiffs, organized via some arbitrary partitioning scheme. Maybe some json sidecars for metadata (or not).
Another way of looking at it (from a RasterFrames perspective) is how might I write out unstructured tiles in a form that's not, say Parquet or ORC... some form that could be slurped up by other tooing.
I'm trying to render a GeoTIFF as PNG, but don't know a priori if it is single or multi band. Getting an assertion failure on color when I attempt renderPng if I don't do the following:
val gt = GeoTiffReader.readMultiband("my.tif")
gt.bandCount match {
case 1 => gt.tile.band(0).renderPng.write("my.png")
case i if i > 1 => gt.tile.renderPng.write("my.png")
}
I'm a GT newbie, so I'm sure overlooking something obvious, but is there not a single mechanism through the API to render an n-band GeoTIFF?
def colorRgb(t: MultibandTile): Tile = {
t.convert(IntConstantNoDataCellType).combine(0, 1, 2) { (rBand, gBand, bBand) =>
val r = if (isData(rBand)) { rBand } else 0
val g = if (isData(gBand)) { gBand } else 0
val b = if (isData(bBand)) { bBand } else 0
if(r + g + b == 0) 0
else {
new java.awt.Color(r, g, b).getRGB
}
}
}
renderJpg()
works like ~ multiband.color().renderJpg
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f4b6ed53a82, pid=37772, tid=0x00007f315015f700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_112-b15) (build 1.8.0_112-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.112-b15 mixed mode linux-amd64 )
# Problematic frame:
# V [libjvm.so+0x6d0a82] jni_SetByteArrayRegion+0xc2
#
# Core dump written. Default location: /mnt/data08/yarn/local/usercache/guiet/appcache/application_1571662316912_1404/container_e54_1571662316912_1404_01_000002/core or core.37772
#
# An error report file with more information is saved as:
# /mnt/data08/yarn/local/usercache/guiet/appcache/application_1571662316912_1404/container_e54_1571662316912_1404_01_000002/hs_err_pid37772.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
val las = spark.read.format("geotrellis.pointcloud.spark.datasource").option("path","hdfs:///user/guiet/Orleans_36_rue_de_la_Borde_Fond_L93.las").load()
File is 1.6g
val testDir = new Path(s"hdfs:////user/guiet/test_geotrellis/USGS_LPC_LA_Barataria_2013_15RYN6548_LAS_2015.las")
val numPoints = HadoopPointCloudRDD(testDir)