Skip to content

Instantly share code, notes, and snippets.

View mbertrand's full-sized avatar

Matt Bertrand mbertrand

View GitHub Profile
@mbertrand
mbertrand / index.html
Last active October 25, 2023 23:58
D3.js + OpenLayers
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>D3.js and Openlayers - US States</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/theme/default/style.css" type="text/css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/themes/blitzer/jquery-ui.css" type="text/css">
<script src="http://d3js.org/d3.v2.min.js?2.9.3"></script>
@mbertrand
mbertrand / index.html
Last active February 16, 2021 01:50
China Provinces - TopoJSON version
<!DOCTYPE html>
<html>
<head>
<title>HTML5</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=650, user-scalable=yes">
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
@mbertrand
mbertrand / es.json
Last active August 28, 2019 12:03
Filtered nested reverse aggregate search
{
"from": 0,
"size": 6,
"query": {
"bool": {
"should": [
{
"bool": {
"filter": {
"bool": {
@mbertrand
mbertrand / trail_extraction.sh
Created January 5, 2018 21:39
Extracting Trails and Campsites from OSM
osmium tags-filter new-hampshire-latest.osm.pbf nwr/highway=path,footway,track nwr/ford=yes nwr/tourism=alpine_hut,wilderness_hut,camp_site nwr/amenity=shelter -o nhoutdoors.pbf
osmium export -o nhoutdoors.json nhoutdoors.pbf
<html>
<head>
</head>
<body>
<video id=example-video width=600 class="video-js vjs-default-skin" controls>
<source
src="https://d3p30yeni206w0.cloudfront.net/transcoded/1/26325823-6405-4423-8e54-f893ec815300/video__index.m3u8"
type="application/x-mpegURL">
</video>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/video.js/5.20.1/video-js.min.css" />

Keybase proof

I hereby claim:

  • I am mbertrand on github.
  • I am mattbert (https://keybase.io/mattbert) on keybase.
  • I have a public key ASBJHKHpn25dRpAMLjc2LtxblWR4vxuBSqQVSGipfypUVQo

To claim this, I am signing this object:

@mbertrand
mbertrand / ZonalStats example.ipynb
Last active November 4, 2016 01:17
IMED2016 RasterStats Example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
server {
listen 80;
server_name mydomain.edu localhost;
location /static {
alias /www/geonode/src/GeoNodePy/geonode/static_root;
}
#GEOSERVER
@mbertrand
mbertrand / Chained_clipVector.xml
Last active November 19, 2015 15:24
WPS Examples - Subsetting raster or vector layers by a specific feature from another vector layer.
<?xml version="1.0" encoding="UTF-8"?>
<wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
<ows:Identifier>vec:Clip</ows:Identifier>
<wps:DataInputs>
<wps:Input>
<ows:Identifier>features</ows:Identifier>
<wps:Reference mimeType="text/xml" xlink:href="http://geoserver/wfs" method="POST">
<wps:Body>
<wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2" xmlns:geonode="http://www.geonode.org/">
<wfs:Query typeName="geonode:quakes_weekly"/>
from TileStache import WSGITileServer, splitPathInfo
import re
#
# Decorator for the WSGITileServer that allows for custom tilestache configuration.
#
# Takes in a tilestache config file and a series of parameter names. They'll be sent to the p