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
#!/usr/bin/python | |
import json | |
import sys | |
args = sys.argv | |
if len(args) != 3: | |
print """Usage: track2geojson.py <input>.json <output>.json""" | |
exit() |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import redis | |
import random | |
import json | |
import time | |
import hashlib | |
from unqlite import UnQLite |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import csv | |
import sys | |
import re | |
import json | |
args = sys.argv | |
ZEROLENGTH_AS_NULL = False |
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
from PyQt4.QtCore import QSize | |
layers = QgsMapLayerRegistry.instance().mapLayers() | |
for name,layer in layers.iteritems(): | |
counter = 0 | |
symbols = layer.rendererV2().symbols() | |
for symbol in symbols: | |
img = symbol.asImage(QSize(16,16)) | |
filename = '/home/user/%s_%s.png' % (name,str(counter)) | |
counter = counter + 1 | |
img.save(filename) |
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
<?php | |
/** Super Lazy PHP PostGIS to GeoJSON | |
* @originalAuthors Leo Hsu and Regina Obe | |
* @url http://www.postgresonline.com/journal/archives/267-Creating-GeoJSON-Feature-Collections-with-JSON-and-PostGIS-functions.html | |
* @phpImplementation pbabik <https://github.com/pbabik> | |
* @license WTFPL 2 <http://www.wtfpl.net/txt/copying/> | |
* @requires PostgreSQL 9.3 && PostGIS 2.1 or higher | |
**/ |
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
<?php | |
/** | |
* PostGIS to GeoJSON | |
* Query a PostGIS table or view and return the results in GeoJSON format, suitable for use in OpenLayers, Leaflet, etc. | |
* | |
* @param string $bbox Bounding box of request *REQUIRED* | |
* @param string $geotable The PostGIS layer name *REQUIRED* | |
* @param string $geomfield The PostGIS geometry field *REQUIRED* | |
* @param string $srid The SRID of the returned GeoJSON *OPTIONAL (If omitted, EPSG: 4326 will be used)* |