Skip to content

Instantly share code, notes, and snippets.

View andrewharvey's full-sized avatar

Andrew Harvey andrewharvey

View GitHub Profile
We couldn’t find that file to show.
@andrewharvey
andrewharvey / adding NearMap image sources to libchamplain.
Created March 21, 2010 02:07
libchamplain edit. This adds NearMap images as libchamplain sources.
diff --git a/champlain/champlain-map-source-factory.c b/champlain/champlain-map-source-factory.c
index e21e509..8bb0f30 100644
--- a/champlain/champlain-map-source-factory.c
+++ b/champlain/champlain-map-source-factory.c
@@ -254,6 +254,96 @@ ChamplainMapSourceDesc MFF_RELIEF_DESC =
};
static
+ChamplainMapSourceDesc NEARMAP_DEM_DESC =
+ {
@andrewharvey
andrewharvey / gist:643097
Created October 24, 2010 04:28
nearmap-photomap.dgml
<?xml version="1.0" encoding="UTF-8"?>
<dgml xmlns="http://edu.kde.org/marble/dgml/2.0">
<document>
<head>
<name>NearMap PhotoMaps</name>
<target>earth</target>
<theme>nearmap-photomap</theme>
<!-- <icon pixmap="nearmap-photomap-preview.png"/> -->
<visible>true</visible>
<description><![CDATA[<p>Aerial imagery of Australia from NearMap.</p>]]></description>
@andrewharvey
andrewharvey / osm.labels.xml
Created October 29, 2010 09:08
Mapnik OSM osm.xml split into text and non-text
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "inc/entities.xml.inc">
%entities;
]>
<!-- This stylesheet uses features only available in mapnik builds with
libxml2 as the XML parser. Furthermore, there are other features
and behaviour that necessitate an upgrade to mapnik 0.7.1 -->
<Map bgcolor="rgba(0,0,0,0)" srs="&srs900913;" minimum_version="0.7.1">
&fontset-settings;
@andrewharvey
andrewharvey / gist:874161
Created March 17, 2011 11:02
GeoServer SLD For ABS Meshblocks landuse
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>ASB_Meshblocks</Name>
<UserStyle>
@andrewharvey
andrewharvey / planet-replicate-find-next.pl
Created July 8, 2011 22:44
Keeps a local minute-replicate mirror of fosm.org osc files
#!/usr/bin/perl -w
# Inspect a local minute-replicate mirror and return the URL of the next diff file
# To the extent possible under law, the person who associated CC0
# with this work has waived all copyright and related or neighboring
# rights to this work.
# http://creativecommons.org/publicdomain/zero/1.0/
use strict;
@andrewharvey
andrewharvey / sbs-tdf-playlist.pl
Created July 15, 2011 10:12
Generates an RSS feed with mp4 links for SBS's Tour de France Coverage
#!/usr/bin/perl
# SBS Playlist To RSS - v0.2.0
# This script will download the ajax xml file containing the latest full episode videos added to the SBS.com.au site and convert this data into an RSS feed format.
# Originally adapted from the code at http://www.perl.com/pub/a/2001/11/15/creatingrss.html by Chris Ball.
# I declar this code to be in the public domain.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
@andrewharvey
andrewharvey / osm-dev.svg
Created July 24, 2011 07:27
Diagram of OpenStreetMap, development/code/data focused.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewharvey
andrewharvey / bboxfilter.pl
Created August 16, 2011 12:43
XSL to convert http://api.fosm.org/api/0.6/changesets into an Atom/GeoRSS feed
#!/usr/bin/perl -wT
# This script uses XML::Atom::Filter to filter an existing FOSM recent changes
# feed given a query bbox based on the georss:box for each entry in the feed
#
# Ideally we would implement it on the server for /feed to return the static
# atom feed from disk, and /feed?bbox to call this CGI script.
#
# This script is licensed CC0 by Andrew Harvey <andrew.harvey4@gmail.com>
#
@andrewharvey
andrewharvey / expire-tilecache-disk.pl
Created August 25, 2011 12:13
Expires a TileCache Disk cache given an expired tiles list from osm2pgsql
#!/usr/bin/perl -w
# This script was written to expire tiles from a TileCache Disk Cache by
# deleting them given a list of tiles to expire as generated by osm2pgsql.
#
# Author: Andrew Harvey <andrew.harvey4@gmail.com>
# License: CC0 http://creativecommons.org/publicdomain/zero/1.0/
#
# To the extent possible under law, the person who associated CC0
# with this work has waived all copyright and related or neighboring