Skip to content

Instantly share code, notes, and snippets.

@lossyrob
lossyrob / info.json
Created December 20, 2018 19:58
TileJSON.io - Global Friction Surface
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
@lossyrob
lossyrob / info.json
Created December 20, 2018 19:57
TileJSON.io - Global friction surface for cost distance calculations using elevation (SRTM) and OSM roads + water bodies
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
@lossyrob
lossyrob / split_geom.py
Last active December 11, 2020 00:44
Fishnet split of geometry via shapely
import os, sys
import argparse
from shapely.geometry import shape, mapping, box
import json
def split_geom(geometry, output_dir, base_name, cols, rows):
bounds = geometry.bounds
xmin = bounds[0]
xmax = bounds[2]
ymin = bounds[1]
@lossyrob
lossyrob / empty.geojson
Created October 25, 2018 17:28
Empty Feature Collection
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lossyrob
lossyrob / raster-vision-api0.8-example.py
Created August 30, 2018 07:46
Raster Vision API 0.8 Example
import rastervision as rv
def get_scenes_to_labels():
""" Construct a list of tuples of S3 URI's to scenes, and the S3 URI to the label GeoJSON
"""
pass
def split_scenes(scenes_to_labels, test_ratio=0.8):
""" Read in the scenes_to_labels, read GeoJSON labels and split according to the
ratio. Returns a tuple of lists (train, val)

Dear Geo-Community,

I would like to thank Maria for standing up and sharing her opinion. I think that she is brave for stepping into this discussion. As mentioned by her and Sara, this conversation has become uncomfortable for multiple reasons.

I have been holding back on this conversation because I am working on my local chapter and don’t want to blow up my own projects by expressing my opinions. I am ashamed about this political calculus because I think people should jump in when they see something uncomfortable going on in public. I am an advocate for building a welcoming community and as such feel I need to jump in when I feel that things are not right.

To be clear, my opinions and thoughts are my own and do not represent those of my company, non-profit, local chapter, or my board.

TLDR

@lossyrob
lossyrob / ExportSnapshot.scala
Created February 8, 2018 23:09
ExportSnapshot
package osmesa.analytics.oneoffs
import osmesa.analytics._
import cats.implicits._
import com.monovore.decline._
import geotrellis.vector._
import geotrellis.vector.io._
import geotrellis.vector.io.json._
import geotrellis.spark.util.KryoWrapper
@lossyrob
lossyrob / process-planet-dump.sh
Created January 26, 2018 16:21
process planet dump into ORC
# Directory with all the `.dat.gz` files
DUMP_DIRECTORY=???
# Directory to hold working data
WORKING_DIR=???
# osm2orc binary (built from source)
OSM2ORC=???
DATE=2018-01-25
AWS_PROFILE=???
S3_DIR=s3://???/???
@lossyrob
lossyrob / countries.geojson
Created December 2, 2017 04:08
Countries from Natural Earth
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.