Skip to content

Instantly share code, notes, and snippets.

View olivierdalang's full-sized avatar

Olivier Dalang olivierdalang

  • Geneva, Switzerland
View GitHub Profile
def committedFeaturesAdded(a, b):
QgsMessageLog.logMessage( 'committedFeaturesAdded was triggered' )
def committedFeaturesRemoved(a, b):
QgsMessageLog.logMessage( 'committedFeaturesRemoved was triggered' )
def committedAttributeValuesChanges(a, b):
QgsMessageLog.logMessage( 'committedAttributeValuesChanges was triggered' )
def committedGeometriesChanges(a, b):
-- BASIC TABLE
DROP TABLE IF EXISTS test CASCADE;
CREATE TABLE test (
id serial NOT NULL PRIMARY KEY,
name text,
geom geometry(MultiPolygon,4326)
);
-- BASIC VIEW

Install Strabon

Notes to install strabon on Ubuntu 14.04 following this : http://www.strabon.di.uoa.gr/node/20


** At Installing PostgreSQL and PostGIS ** Install postgresql-9.3 and postgis 2.1 by running (not sure?) :

sudo apt-get install postgresql

computeFieldIndex = layer.fieldNameIndex( 'population' )
allFieldsMap = layer.pendingFields()
expression = QgsExpression('"affected" = 1')
expression.prepare(allFieldsMap)
if expression.hasParserError():
raise Exception('Parser error !!')
if self.selectedOnly: #if we want to loop through selection only
features = layer.selectedFeatures()
@olivierdalang
olivierdalang / Constitution Genevoise (projet)
Created October 10, 2012 18:13
Constitution Genevoise (projet)
conversion brute du PDF trouvé à l'adresse suivante
http://fage.ifaway.net/files/2012/06/Projet_de_constitution_version_finale_190612_A4.pdf
REPUBLIQUE ET CANTON DE GENEVE
Assemblée constituante
Population