This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import argparse | |
import logging | |
from multiprocessing.pool import ThreadPool | |
from functools import partial | |
resource = boto3.client('s3') | |
client = boto3.client('s3') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
files = gdal.ReadDir('/vsimem') | |
print ('files:', files) | |
# prints ('files:', ['duck2.tif']) | |
ds = gdal.Open('/vsimem/duck2.tif') | |
# RuntimeError: `/vsimem/duck2.tif' does not exist in the file system, | |
# and is not recognised as a supported dataset name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/vendor/arbiter/arbiter.cpp b/vendor/arbiter/arbiter.cpp | |
index 797358fdc..6cffbf9ec 100644 | |
--- a/vendor/arbiter/arbiter.cpp | |
+++ b/vendor/arbiter/arbiter.cpp | |
@@ -86,13 +86,22 @@ namespace | |
if (!b.isNull()) | |
{ | |
- for (const auto& key : b.getMemberNames()) | |
+ if (b.isObject()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.7 | |
RUN \ | |
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories; \ | |
apk update; \ | |
apk add --no-cache --virtual .build-deps \ | |
alpine-sdk \ | |
unzip \ | |
cmake \ | |
eigen-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pipeline": | |
[ | |
{ | |
"type": "filters.crop", | |
"polygon": "POLYGON ((491778.797502680972684 4835719.399980950169265,491766.640982382989023 4835720.212235029786825,491754.453203755023424 4835717.977577949874103,491738.546582861978095 4835712.149050749838352,491715.327292474976275 4835704.007842719554901,491687.17038429499371 4835692.913371060043573,491657.794699017016683 4835681.818873340263963,491630.294058877974749 4835671.927553770132363,491602.137149725982454 4835660.208073520101607,491576.324034175020643 4835644.785473530180752,491548.667117330012843 4835625.144034390337765,491526.447822184010874 4835605.393332850188017,491504.166020004020538 4835583.205100550316274,491483.009224092005752 4835553.079297300428152,491458.6023310769815 4835512.625176940113306,491447.852031218993943 4835487.812155050225556,491433.320376735005993 4835454.514576889574528,491417.569948318006936 4835422.451361900195479,491397.444402437016834 4835381.934827670454979,491380.443941131001338 4835347.465305830352008,491359.630872 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(pdal info readers.numpy Debug) inner:{ | |
} | |
(pdal info readers.numpy Debug) inner:{ | |
"0": | |
{ | |
"Blue": 88, | |
"GpsTime": 245380.7825, | |
"Green": 77, | |
"Intensity": 143, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
m_executor = std::shared_ptr<pdal::PipelineExecutor>(new pdal::PipelineExecutor(json)); | |
pdal::PipelineManager& manager = m_executor->getManager(); | |
std::stringstream strm(json); | |
manager.readPipeline(strm); | |
pdal::Stage *r = manager.getStage(); | |
if (!r) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from osgeo import gdal, ogr, osr | |
import numpy as np | |
def write( filename, | |
rasterOrigin, | |
pixelWidth, | |
pixelHeight, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options=['COMPRESS=LZW',"BLOCKXSIZE=256", 'TILED=YES', 'COPY_SRC_OVERVIEWS=YES'] | |
driver = gdal.GetDriverByName('GTiff') | |
outRaster = driver.Create(filename, cols, rows, 2, gdal.GDT_UInt16 , options=options) | |
outRaster.SetGeoTransform((originX, pixelWidth, 0, originY, 0, pixelHeight)) | |
outband = outRaster.GetRasterBand(1) | |
outband.WriteArray(array) | |
zband = outRaster.GetRasterBand(2) | |
zs = np.empty_like(array) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import numpy as np | |
from osgeo import gdal | |
PIXEL_SIZE=162.5 | |
class Tile(object): | |
def __init__(self, tilex, tiley, tilez, xsize, ysize): |