Skip to content

Instantly share code, notes, and snippets.

View GISJohnECS's full-sized avatar
🤠
Making memes & maps

John Lister GISJohnECS

🤠
Making memes & maps
View GitHub Profile
@darrenwiens
darrenwiens / COPC_3DEP
Created July 2, 2022 18:24
A map and COPC viewer for USGS 3DEP
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>COPC 3DEP Example</title>
<meta
name="viewport"
content="initial-scale=1,maximum-scale=1,user-scalable=no"
/>
<link
@jgomezdans
jgomezdans / calc_ndvi_gdal.py
Created February 24, 2016 16:23
Simple script to calculate NDVI using pure GDAL
from osgeo import gdal
import numpy
g = gdal.Open ("baikal_subset.tif")
if g is None:
raise IOError, "Couldn't open baikal_subset.tif"
b3 = g.GetRasterBand(3).ReadAsArray().astype(np.float32)
b4 = g.GetRasterBand(4).ReadAsArray().astype(np.float32)
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
id,name,amount
109,"building",1456894
164,"house",1383613
7,"Shopping and services",839415
17,"store / shop",831628
203,"school",676869
4,"dining and leisure",671035
74,"restaurant",385073
194,"park",283545
163,"sport venue",274433