Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Harvey andrewharvey

View GitHub Profile
@QuarkTheAwesome
QuarkTheAwesome / tfnsw-to-osm-osmosis.xml
Last active Feb 25, 2020
Osmosis TagTransform file to convert TfNSW Cycleways data into OSM-ready tags
View tfnsw-to-osm-osmosis.xml
<?xml version="1.0"?>
<!--
Things to note:
- You may or may not want name= and alt_name= from this dataset, as name= has other sources
and standards (St. vs Street); while alt_name seems to be naming sidewalks after the
assosciated road
- name= and alt_name= are *stripped by default*. Scroll down and uncomment the appropriate
lines to output them.
- foot=designated on highway=cycleway is not accompanied by bicycle=designated by default
- SURFACE=Spray Seal and SURFACE=AC are translated as surface=asphalt
View gist:ebfe021458f96e4f30b5
#!/bin/bash
# rename TMS tiles to the XYZ schema
# no quoting, since all files have simple numeric names
# do not run this anywhere else than INSIDE your tiles directory
# run it like this: find . -name "*.png" -exec ./tms2xyz.sh {} \;
filename=$1
tmp=${filename#*/} # remove to first /
@hamishcampbell
hamishcampbell / polyomino.py
Created Sep 6, 2013
Polyomino Reference Source - PyCon 2013
View polyomino.py
# -*- coding: utf-8 -*-
#!/usr/bin/env python
import sys
class Polyomino(object):
def __init__(self, iterable):
self.squares = tuple(sorted(iterable))
def __repr__(self):
You can’t perform that action at this time.