Skip to content

Instantly share code, notes, and snippets.

Simeon H.K. Fitch metasim

Block or report user

Report or block metasim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ExplodeWithLocation.scala
import geotrellis.raster._
import geotrellis.vector.Extent
import org.apache.spark.sql._
import org.apache.spark.sql.functions._
import org.locationtech.jts.geom.Point
import org.locationtech.rasterframes._
import org.locationtech.rasterframes.datasource.raster._
import org.locationtech.rasterframes.encoders.CatalystSerializer._
object ExplodeWithLocation extends App {
View RFValueAtPoint.scala
import org.apache.spark.sql._
import org.apache.spark.sql.functions._
import org.locationtech.rasterframes._
import org.locationtech.rasterframes.datasource.raster._
import org.locationtech.rasterframes.encoders.CatalystSerializer._
import geotrellis.raster._
import geotrellis.vector.Extent
import org.locationtech.jts.geom.Point
object ValueAtPoint extends App {
View zoom_for_poly_wgs84.py
_ogc_crs84 = 'urn:ogc:def:crs:OGC:1.3:CRS84'
_web_mercator_epsg = 'EPSG:3857'
def _meters_per_pixel(zoom: int, lat: float=0.0, tile_size:int=256) -> float:
"""
Return the pixel resolution for a given mercator tile zoom and lattitude.
:param zoom: Mercator zoom level
:param lat: Latitude in decimal degree. Optional (default: 0)
View gt-3184.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View ParallelJP2.scala
import org.apache.spark.sql.SparkSession
import geotrellis.raster._
import geotrellis.raster.gdal.GDALRasterSource
// implicit val spark = SparkSession.builder().
// master("local[*]").appName("Hit me").getOrCreate()
val path = "https://s22s-rasterframes-integration-tests.s3.amazonaws.com/B08.jp2"
spark.range(1000).rdd.
View ClassificationRasterSource.scala
/*
* This software is licensed under the Apache 2 license, quoted below.
*
* Copyright 2020 Astraea, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* [http://www.apache.org/licenses/LICENSE-2.0]
View Classification.scala
/*
* This software is licensed under the Apache 2 license, quoted below.
*
* Copyright 2017 Astraea, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* [http://www.apache.org/licenses/LICENSE-2.0]
View multiband-read-example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View rf-kmeans.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View backtrace.scala
java.lang.AssertionError: assertion failed: unsafe symbol Logger (child of package scalalogging) in runtime reflection universe
at scala.reflect.internal.Symbols$Symbol.<init>(Symbols.scala:184)
at scala.reflect.internal.Symbols$TypeSymbol.<init>(Symbols.scala:3009)
at scala.reflect.internal.Symbols$ClassSymbol.<init>(Symbols.scala:3201)
at scala.reflect.internal.Symbols$StubClassSymbol.<init>(Symbols.scala:3496)
at scala.reflect.internal.Symbols$Symbol.newStubSymbol(Symbols.scala:498)
at scala.reflect.internal.pickling.UnPickler$Scan.readExtSymbol$1(UnPickler.scala:258)
at scala.reflect.internal.pickling.UnPickler$Scan.readSymbol(UnPickler.scala:284)
at scala.reflect.internal.pickling.UnPickler$Scan.readSymbolRef(UnPickler.scala:649)
at scala.reflect.internal.pickling.UnPickler$Scan.readType(UnPickler.scala:417)
You can’t perform that action at this time.