Skip to content

Instantly share code, notes, and snippets.


Andrew Harvey andrewharvey

View GitHub Profile
View gist:ebfe021458f96e4f30b5
# 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 ./ {} \;
tmp=${filename#*/} # remove to first /
hamishcampbell /
Created Sep 6, 2013
Polyomino Reference Source - PyCon 2013
# -*- coding: utf-8 -*-
#!/usr/bin/env python
import sys
class Polyomino(object):
def __init__(self, iterable):
self.squares = tuple(sorted(iterable))
def __repr__(self):
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