Skip to content

Instantly share code, notes, and snippets.

View RobertoTjesse's full-sized avatar

Roberto RobertoTjesse

  • 02:14 (UTC -12:00)
View GitHub Profile
@RobertoTjesse
RobertoTjesse / GTiff_compression_benchmark.py
Created September 1, 2021 14:24 — forked from kr-stn/GTiff_compression_benchmark.py
Benchmark filesize and read/ write times for various GeoTiff compression algorithms
__author__ = 'kersten.clauss'
"""Benchmark different GeoTiff compression algorithms.
Usage: GTiff_compression_benchmark.py some_geo.tif
Requires the GDAL tools to be present and executable from the command line of your system.
This script will take a GeoTiff as input and create copies with different compression algorithms from it.
It measures the filesize, compression and decompression times and returns them as a table.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.network "private_network", ip: "192.168.33.13"
config.vm.provider "virtualbox" do |vb|
@RobertoTjesse
RobertoTjesse / Projector.py
Last active March 11, 2019 14:26
Add a projection file to all the shapefiles inside a folder
import os, urllib.request, urllib.parse, urllib.error
def getWKT_PRJ (epsg_code):
# access projection information
wkt = urllib.request.urlopen("http://spatialreference.org/ref/epsg/{0}/prettywkt/".format(epsg_code))
decoded = (wkt.read().decode('utf-8'))
# remove spaces between charachters
@RobertoTjesse
RobertoTjesse / Add_Projection.py
Created March 11, 2019 14:24
Add a projection file to all the shapefiles within a directory
import os
def getWKT_PRJ (epsg_code):
import urllib.request, urllib.parse, urllib.error
# access projection information
wkt = urllib.request.urlopen("http://spatialreference.org/ref/epsg/{0}/prettywkt/".format(epsg_code))
decoded = (wkt.read().decode('utf-8'))
# remove spaces between charachters
@RobertoTjesse
RobertoTjesse / Plotting CAMS nitrogen dioxide products.ipynb
Created November 16, 2018 09:55 — forked from erget/Plotting CAMS nitrogen dioxide products.ipynb
Sample code for plotting Copernicus nitrogen dioxide products
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.