Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

"""
allows multiple selection in a large list
Contact : marco@opengis.ch
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"""
# -*- coding: utf-8 -*-
"""
***************************************************************************
customwidgets.py
---------------------
Date : May 2014
Copyright : (C) 2014 by Denis Rouzaud
Email : denis.rouzaud@gmail.com
***************************************************************************
<head><meta charset="utf-8" /><script src="https://cdn.plot.ly/plotly-latest.min.js"></script></head><div id="myDiv" style="height: 100%; width: 100%;" class="plotly-graph-div"></div><script type="text/javascript">window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL="https://plot.ly";Plotly.newPlot("myDiv", [{"type": "scatter", "x": [6.81, 6.78, 6.49, 6.72, 6.88, 7.68, 7.69, 7.38, 6.76, 6.84, 6.91, 6.74, 6.77, 6.73, 6.68, 6.94, 6.72], "y": [1046.67, 1315.0, 1418.0, 997.33, 2972.3, 9700.0, 6726.0, 6002.5, 2096.0, 2470.0, 867.0, 2201.7, 1685.6, 2416.7, 1618.3, 2410.0, 2962.0], "mode": "markers", "ids": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]}], {"showlegend": true}, {"linkText": "Export to plot.ly", "showLink": false})</script>
<script>
var plotly_div = document.getElementById('myDiv')
var plotly_data = plotly_div.data
plotly_div.on('plotly_selected', function(data){
featureId = plotly_data[0].ids[data.points[0].pointNumber]
featureIds = []
data.points.forEa
@ghtmtt
ghtmtt / missing_tests_list.py
Last active December 7, 2017 15:14
Processing tests missing list
import processing
import yaml
# get QGIS algorithm list by name
qgis_algs = [i.name() for i in QgsApplication.processingRegistry().providerById("qgis").algorithms()]
# get NATIVE algorithm list by name
native_algs = [i.name() for i in QgsApplication.processingRegistry().providerById("native").algorithms()]
# total algorithms of QGIS provider in Processing
from qgis.core import (QgsProcessingParameterFeatureSource,
QgsProcessingParameterField,
QgsProcessingParameterFileDestination,
QgsProcessingUtils,
QgsProcessingAlgorithm)
class myScript(QgsProcessingAlgorithm):
INPUT = 'INPUT'
# -*- coding: utf-8 -*-
from operator import itemgetter
from PyQt5.QtCore import QCoreApplication
from qgis.core import (QgsFeatureSink,
QgsProcessing,
QgsProcessingAlgorithm,
QgsProcessingParameterFeatureSink,
QgsProcessingParameterNumber,
# -*- coding: utf-8 -*-
from PyQt5.QtCore import QCoreApplication
from qgis.core import (QgsProcessing,
QgsFeatureSink,
QgsProcessingException,
QgsProcessingAlgorithm,
QgsProcessingParameterFeatureSource,
QgsProcessingParameterFeatureSink,
QgsProcessingParameterVectorLayer,
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f37d9d0c7aa in __GI___waitpid (pid=5033, stat_loc=0x7fff203175ec, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
30 ../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
[Current thread is 1 (Thread 0x7f37d0998e40 (LWP 5003))]
#0 0x00007f37d9d0c7aa in __GI___waitpid (pid=5033, stat_loc=0x7fff203175ec, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
resultvar = 18446744073709551104
sc_cancel_oldtype = 0
sc_ret = <optimized out>
#1 0x0000561bf4f541b0 in ?? ()
QGIS died on signal 11src/providers/wms/qgswmsprovider.cpp:871 : (draw) [14ms] [thread:0x556ade7f49a0] TILE CACHE total: 96 / 256
src/providers/wms/qgswmsprovider.cpp:897 : (readBlock) [0ms] [thread:0x556ade7f49a0] image height = 152 bytesPerLine = 888
src/providers/postgres/qgspostgresfeatureiterator.cpp:312 : (fetchFeature) [308ms] [thread:0x556ade7f49a0] Finished after 17 features
[New LWP 16769]
[New LWP 16770]
[New LWP 16771]
[New LWP 16772]
[New LWP 16773]
[New LWP 16775]
[New LWP 16776]
# -*- coding: utf-8 -*-
"""
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *