Skip to content

Instantly share code, notes, and snippets.

View timlinux's full-sized avatar

Tim Sutton timlinux

View GitHub Profile
@timlinux
timlinux / README.markdown
Created October 10, 2011 21:33 — forked from lovasoa/README.markdown
The dezoomify script is capable of grabbing images from a webpage containing a Zoomify viewer and automatically stitching the images with javascript and the HTML5 <canvas> element.

#Reassemble tiles of a zoomify-powered image

This script makes one downloadable image from an image viewable via a flash zoomify interface.

Input : the URL of a site containing a zoomify viewer. Output : An image that you can download (in Firefox).

#Try it If you are not interested in the source code and just want to assemble tiles of (dezoomify) a zoomify-powered image, go there : unzoomify an image

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
SPATIALINDEX_INCLUDE_DIR
used as include directory in directory /home/timlinux/dev/cpp/Quantum-GIS/src/core
SPATIALINDEX_LIBRARY
linked by target "qgis_core" in directory /home/timlinux/dev/cpp/Quantum-GIS/src/core
SPATIALITE_INCLUDE_DIR
used as include directory in directory /home/timlinux/dev/cpp/Quantum-GIS/src/plugins/offline_editing
SPATIALITE_LIBRARY
linked by target "offlineeditingplugin" in directory /home/timlinux/dev/cpp/Quantum-GIS/src/plugins/offline_editing
def unload(self):
"""Gui breakdown procedure (for QGIS plugin api).
This method is called by QGIS and should be used to *remove*
any graphical user interface elements that should appear in QGIS.
Args:
None.
Returns:
None.
Couldn't load plugin inasafe due an error when calling its classFactory() method
Traceback (most recent call last):
File "/usr/local/qgis1.8/share/qgis/python/qgis/utils.py", line 164, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/timlinux/.qgis//python/plugins/inasafe/__init__.py", line 72, in classFactory
from safe_qgis.plugin import Plugin
File "/usr/local/qgis1.8/share/qgis/python/qgis/utils.py", line 309, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/timlinux/.qgis//python/plugins/inasafe/safe_qgis/__init__.py", line 8, in
@timlinux
timlinux / gist:4951511
Created February 14, 2013 09:18
Post processors
self.postProcessingOutput
{'Gender': [(PyQt4.QtCore.QString(u'Entire area'), OrderedDict([(u'Total', {'value': 4247159, 'metadata': {}}), (u'Female population', {'value': 2123580, 'metadata': {}}), (u'Weekly hygiene packs', {'value': 1685485, 'metadata': {'description': 'Females hygiene packs for weekly use'}}), (u'Additional weekly rice kg for pregnant and lactating women', {'value': 197884, 'metadata': {'description': 'Additional rice kg per week for pregnant and lactating women'}})])), (PyQt4.QtCore.QString(u'Entire area'), OrderedDict([(u'Total', {'value': 0, 'metadata': {}}), (u'Female population', {'value': 0, 'metadata': {}}), (u'Weekly hygiene packs', {'value': 0, 'metadata': {'description': 'Females hygiene packs for weekly use'}}), (u'Additional weekly rice kg for pregnant and lactating women', {'value': 0, 'metadata': {'description': 'Additional rice kg per week for pregnant and lactating women'}})]))], 'Age': [(PyQt4.QtCore.QString(u'Entire area'), OrderedDict([(u'Total', {'value': 4247159, 'meta
>>> print myFeature[3].toFloat()
(1.909999966621399, True)
>>> myFeature.fields().count()
0
>>> myFeature.fields().toList()
[]
>>> myFeature.attributes()
[<PyQt4.QtCore.QVariant object at 0x4dd0600>, <PyQt4.QtCore.QVariant object at 0x4dd0670>, <PyQt4.QtCore.QVariant object at 0x4dd07c0>, <PyQt4.QtCore.QVariant object at 0x4dd0830>, <PyQt4.QtCore.QVariant object at 0x4dd0210>, <PyQt4.QtCore.QVariant object at 0x4dd0130>, <PyQt4.QtCore.QVariant object at 0x4dd02f0>, <PyQt4.QtCore.QVariant object at 0x4dd0360>, <PyQt4.QtCore.QVariant object at 0x4dd0440>]
def run_script(iface):
mw = iface.mainWindow()
g = mw.saveGeometry()
s = mw.saveState()
f = file('/tmp/geom.txt', 'wt')
f.write(g)
f.write(s)
f.close()
Couldn't load plugin geoserver_bridge due an error when calling its classFactory() method
Traceback (most recent call last):
File "/usr/local/qgis1.8/share/qgis/python/qgis/utils.py", line 164, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/timlinux/.qgis//python/plugins/geoserver_bridge/__init__.py", line 55, in classFactory
from geoserver_qgis.plugin import Plugin
File "/usr/local/qgis1.8/share/qgis/python/qgis/utils.py", line 309, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/timlinux/.qgis//python/plugins/geoserver_bridge/geoserver_qgis/plugin.py", line 29, in
diff --git a/geoserver_qgis/__init__.py b/geoserver_qgis/__init__.py
index 3da0823..be866fe 100644
--- a/geoserver_qgis/__init__.py
+++ b/geoserver_qgis/__init__.py
@@ -3,4 +3,4 @@ import sys
#Add parent directory to the path
pardir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
-sys.path.append(pardir)
+#sys.path.append(pardir)