Skip to content

Instantly share code, notes, and snippets.

View echeipesh's full-sized avatar

Eugene Cheipesh echeipesh

View GitHub Profile

GeoMesa Parquet Support

GeoMesa implements parquet support as part of FileSystem DataStore. The interesting part is that in addition to expected WKB encoding it adds X/Y geometry encoding using the Parquet repeat level and definition level.

Code links: Parquet Writer Test and WriteSupport

Writing GADM36 level 2 data produces following schema:

@echeipesh
echeipesh / compare_rasters.py
Last active October 22, 2021 20:12
GlobalForestWatch Output Audits
#%%
gt_dir = "/opt/data/gfw2-data/forest_change/umd_landsat_alerts/prod/analysis"
pro_dir = "/opt/data/gfwpro/gfwpro-raster-data"
import os
gt_rasters = [file for file in os.listdir(gt_dir) if file.endswith(".tif")]
pro_rasters = [file for file in os.listdir(pro_dir) if file.endswith(".tif")]
path = gt_rasters[0]
@echeipesh
echeipesh / Border.scala
Created May 4, 2021 21:22
Border Class
/**
* Tracks which border are present
*/
class Border(val underlying: Int) extends AnyVal {
def remove(other: Border): Border = new Border(~other.underlying & underlying)
def add(other: Border): Border = new Border(other.underlying | underlying)
def hasTop: Boolean = ((underlying) & 1) == 1
def hasLeft: Boolean = ((underlying >>> 1) & 1) == 1
def hasRight: Boolean = ((underlying >>> 2) & 1) == 1
def hasBottom: Boolean = ((underlying >>> 3) & 1) == 1
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@echeipesh
echeipesh / catalog.json
Last active July 20, 2020 15:23
Tiny SpaceNet STAC
{
"id": "tiny-spacenet",
"stac_version": "0.9.0",
"description": "Tiny SpaceNet Subset",
"links": [
{
"rel": "root",
"href": "./catalog.json",
"type": "application/json"
},
@echeipesh
echeipesh / Validate HDPR.ipynb
Created April 17, 2020 13:25
Facebook HRPD Census
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@echeipesh
echeipesh / info.json
Created April 7, 2020 20:28
TileJSON.io - WorldPop 2020WorldPop 2020
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
@echeipesh
echeipesh / info.json
Created April 7, 2020 20:26
TileJSON.io - WorldPop 2020
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
@echeipesh
echeipesh / info.json
Created April 5, 2020 20:39
TileJSON.io - WorldPop 2020 USA
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
@echeipesh
echeipesh / info.json
Created November 1, 2019 15:01
TileJSON.io - SDG 9.1.1 Country DataSDG 9.1.1 Country DataSDG 9.1.1 Country Data
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},