This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L.TileLayer.GWC = L.TileLayer.extend({ | |
_zeroPadder: function(unPaddedInt, padReq) { | |
if (unPaddedInt == 100) { | |
padReq++; | |
} | |
let padded = unPaddedInt.toString(); | |
while (padded.length < padReq) { | |
padded = "0" + padded; | |
} | |
return padded; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name click n' dirt | |
// @version 0.1 | |
// @description Alt-click to mark tiles as dirty on openstreetmap.org | |
// @include http://www.openstreetmap.org/* | |
// @include https://www.openstreetmap.org/* | |
// @copyright vax 2014 | |
// ==/UserScript== | |
var code = '\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir dxf | |
function convert { | |
ogr2ogr "dxf/$1" -f "DXF" $2 -where "$3" -skipfailures 2>/dev/null | |
echo "Converted dxf/$1" | |
} | |
for f in *.shp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name OSM Mapnik tiles for Garmin Connect | |
// @version 0.1 | |
// @description Gives you nice looking OpenStreetMap-tiles in Garmin Connect | |
// @match http://*.connect.garmin.com/* | |
// ==/UserScript== | |
var code = '(function() { MAPSERVER_OSM.length = 0;MAPSERVER_OSM[0] = "tile.osm.org";MAPSERVER_OSM_TILEPATH = "";})();'; | |
var script = document.createElement("script"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xml.etree.ElementTree as ET | |
tree = ET.parse('las.kml') | |
root = tree.getroot()[0] | |
for pm in root.findall('{http://www.opengis.net/kml/2.2}Placemark'): | |
if pm[0].text != "selected_square_style": | |
root.remove(pm) | |
else: | |
pm.remove(pm[0]) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:$('#headerContainer,#geovyTabsContainer,#geovy-ortnamn-module').remove();$('#geovyMap').attr('style','margin: 0 !important'); |