[Qgis-developer] Field visibility in Python

2014-06-23 Thread Tom Chadwin
e docs say attributeDisplayName(attributeIndex), while they say editorWidgetV2Config(fieldIdx). What's the difference between attributeIndex and fieldIdx? Thanks Tom Tom Chadwin, UK National Parks Portal Manager Telephone: 01434 611511 Mob: 07881 109617 Web: www.northumberlandnationalp

Re: [Qgis-developer] Field visibility in Python

2014-06-23 Thread Tom Chadwin
miera, c3a2817 Any ideas? Tom > -Original Message- > From: Matthias Kuhn [mailto:matthias.k...@gmx.ch] > Sent: 23 June 2014 13:55 > To: Tom Chadwin; qgis-developer@lists.osgeo.org > Subject: Re: [Qgis-developer] Field visibility in Python > > Hi Tom, > > The fo

Re: [Qgis-developer] Field visibility in Python

2014-06-23 Thread Tom Chadwin
> Sent: 23 June 2014 14:46 > To: Tom Chadwin; qgis-developer@lists.osgeo.org > Subject: Re: [Qgis-developer] Field visibility in Python > > Hi Tom, > > That works starting from 2.3 (master) / 2.4 (release/stable) > > For 2.2 you will have to work with > > i.editType

[Qgis-developer] How can I reproject a raster and change its file type in a plugin?

2014-07-02 Thread Tom Chadwin
I need to reproject rasters and change their file type in a QGIS plugin. Can I do this using the QGIS API? If not, I can do this externally with gdal_translate, but how can I determine the path to gdal_translate in Python? Thanks Tom Tom Chadwin, UK National Parks Portal Manager Telephone

[Qgis-developer] Determine whether layer is OpenLayers layer

2014-07-16 Thread Tom Chadwin
on of the OpenLayers plugin suitable for working with it in plugin development? An API? Tom Chadwin, UK National Parks Portal Manager Telephone: 01434 611511 Mob: 07881 109617 Web: www.northumberlandnationalpark.org.uk<http://www.northumberlandnationalpark.org.uk/> IMPORTANT NOTICE - Disclaim

[Qgis-developer] Persist plugin GUI dialog settings

2014-09-05 Thread Tom Chadwin
Hello Is there either a QT/native PyQgis method for saving the settings of a plugin dialog so that they persist between application restarts? Or is there a recommended/established best practice way of doing so? Thanks Tom Tom Chadwin, UK National Parks Portal Manager Telephone: 01434 611511

[Qgis-developer] Handling deprecation of QgsMapCanvas.mapRenderer()

2014-09-17 Thread Tom Chadwin
().destinationCrs() Is that correct? If so (as a QGIS plugin and Python beginner) what is the best way to handle the deprecation and maintain backwards compatibility, given that QgsMapCanvas.mapRenderer() is only in 2.4+? Thanks Tom Tom Chadwin, UK National Parks Portal Manager Telephone: 01434 611511

[Qgis-developer] Reading out categorized styles

2014-11-17 Thread Tom Chadwin
m in javascript which Leaflet can understand. Thanks Tom Tom Chadwin, UK National Parks Portal Manager Telephone: 01434 611511 Mob: 07881 109617 Web: www.northumberlandnationalpark.org.uk<http://www.northumberlandnationalpark.org.uk/> IMPORTANT NOTICE - Disclaimer - This communication i

Re: [Qgis-developer] Reading out categorized styles

2014-11-17 Thread Tom Chadwin
Found it: layer.rendererV2().classAttribute() Thanks Tom -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Reading-out-categorized-styles-tp5173357p5173358.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. __

[Qgis-developer] QgsVectorFileWriter.writeAsVectorFormat() created geoJSON Points in 2.4, now Multipoints in 2.6

2014-11-26 Thread Tom Chadwin
Hello In 2.4, when writing geoJSON, QgsVectorFileWriter.writeAsVectorFormat() created Point features. In 2.6, this seems to have changed to Multipoint. Is this intentional? If so, why? Thanks Tom Tom Chadwin, UK National Parks Portal Manager Telephone: 01434 611511 Mob: 07881 109617 Web

[Qgis-developer] Retrieve field name used as label

2014-12-03 Thread Tom Chadwin
Hello all I'm trying to build labelling into qgis2leaf. How do I retrieve the name of the field used as a layer's label? I've tried QgsLabel::labelField ( int attr ), but I don't understand what the argument attr is. Thanks Tom -- View this message in context: http://osgeo-org.1560.x6.na

Re: [Qgis-developer] Retrieve field name used as label

2014-12-04 Thread Tom Chadwin
Can anyone help with this? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Retrieve-field-name-used-as-label-tp5176293p5176544.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer maili

Re: [Qgis-developer] Retrieve field name used as label

2014-12-04 Thread Tom Chadwin
> QgsLabel(layer.pendingFields()).fields()[0].name() That doesn't work - it gives the field at position 0, not the labelling field. > layer.customProperty("labeling/fieldName") But this does work perfectly. Thank you so much. Tom -- View this message in context: http://osgeo-org.1560.x6.nab

Re: [Qgis-developer] Retrieve field name used as label

2014-12-04 Thread Tom Chadwin
Noted. Thanks, Nathan. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Retrieve-field-name-used-as-label-tp5176293p5176558.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing l

Re: [Qgis-developer] Export to web: OpenLayers, Leaflet, Threejs

2015-01-26 Thread Tom Chadwin
Thanks, Riccardo, for bringing this discussion to my attention. I think we need to proceed with caution, considering the following issues: 1. Bigger is not always better - specialized tools often yield better results than big ones with every option under the sun bloating the code and confusing the

Re: [Qgis-developer] UK styles

2015-01-27 Thread Tom Chadwin
The official source for Ordnance Survey SLDs is here: http://www.ordnancesurvey.co.uk/business-and-government/help-and-support/products/styled-layer-descriptors.html Their licence (http://www.ordnancesurvey.co.uk/docs/licences/stylesheet-licence-v2.pdf) contains the following: "You may only lice

[Qgis-developer] Python - save raster layer as rendered image

2015-04-14 Thread Tom Chadwin
How do I save a layer as a rendered image? qgis2leaf exports rasters, but they are unrendered, and hence sometimes do not display correctly, if at all. How do I "Save raster layer as..." "Rendered image" via Python? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Python-sav

[Qgis-developer] Python - granular access to rules in rule-based renderer

2015-04-16 Thread Tom Chadwin
I'm implementing rule-based rendering in qgis2leaf. I know I can get the filterExpressions with: qgis.utils.iface.mapCanvas().layers().rendererV2().rootRule().children().filterExpression() However, filterExpressions are in "SQL-like" syntax. I need to transform these into JavaScript: QGIS: "nam

Re: [Qgis-developer] Python - granular access to rules in rule-based renderer

2015-04-16 Thread Tom Chadwin
Hi Nathan > Don't use regex. You are in for a world of pain if you go that way, and > not the kind of pain you feel good about after. Akin to: http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags Many thanks for looking into it – very much appreciat

[Qgis-developer] Which plugin versions should be in the repo?

2015-04-29 Thread Tom Chadwin
ed it, and uploaded a new version. I deleted the version with the major bug. Is that correct? Or should I leave all versions up there even if faulty? All versions are on GitHub. Thanks Tom Tom Chadwin, ICT Manager Telephone: 01434 611530 Mob: Web: www.northumberlandnationalpark.org.uk

Re: [Qgis-developer] Which plugin versions should be in the repo?

2015-05-05 Thread Tom Chadwin
Many thanks - I'll get rid of everything but the latest experimental. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Which-plugin-versions-should-be-in-the-repo-tp5203557p5204146.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___

[Qgis-developer] Debugging a QGIS crash

2015-05-09 Thread Tom Chadwin
nfo. What do I do next? Thanks Tom Tom Chadwin, ICT Manager Telephone: 01434 611530 Mob: Web: www.northumberlandnationalpark.org.uk<http://www.northumberlandnationalpark.org.uk/> IMPORTANT NOTICE - Disclaimer - This communication is from Northumberland National Park Authority (NNPA)

[Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-05-26 Thread Tom Chadwin
Has anyone set up TravisCI to test commits in a QGIS Python plugin Github repo? Can anyone give me some help? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-TravisCI-integration-in-Github-for-QGIS-Python-plugin-tp5207646.html Sent from the Quantum GIS - Developer mai

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-05-27 Thread Tom Chadwin
Thanks very much, Martin. Looks like I have a lot to learn (unittest/nose, as well as Travis itself). -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-TravisCI-integration-in-Github-for-QGIS-Python-plugin-tp5207646p5207727.html Sent from the Quantum GIS - Developer mai

Re: [Qgis-developer] Persist plugin GUI dialog settings

2015-06-05 Thread Tom Chadwin
OK, so I have found the documentation which says I should use QSettings(), which is clear enough, and I can read settings in fine. However, if I want my plugin settings to persist transparently (ie the user should not have to save the settings explicitly), where in the plugin should I put all my QS

Re: [Qgis-developer] Persist plugin GUI dialog settings

2015-06-06 Thread Tom Chadwin
ettings at some other point. Any ideas? Original message From: "Richard Duivenvoorde [via OSGeo.org]" Date: 05/06/2015 16:08 (GMT+00:00) To: Tom Chadwin Subject: Re: Persist plugin GUI dialog settings On 05-06-15 16:34, Tom Chadwin wrote: > OK, so I have found th

[Qgis-developer] Python binding for HTML map tip

2015-06-08 Thread Tom Chadwin
In Python, is it possible to retrieve the value for an HTML map tip: Layer Properties > Display > Map tip display text > HTML I've been rooting around in the API, but haven't managed to find it. Thanks Tom -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Python-binding-f

Re: [Qgis-developer] Persist plugin GUI dialog settings

2015-06-09 Thread Tom Chadwin
I've ended up connecting the QSettings() function to the parent QTreeWidget's itemChanged signal. This works for text and checkboxes, but does not seem to emit for changing the selected item in a combobox. Does anyone know what signal is emitted under these circumstances? -- View this message in

[Qgis-developer] API: fill style?

2015-06-16 Thread Tom Chadwin
I need to get the "Fill style" of a simple fill symbol layer, but cannot find that in the API docs. Does it exist? I need it to fix a reported bug in qgis2web: https://github.com/tomchadwin/qgis2web/issues/10 Specifically, I need to determine if a simple fill symbol layer has fill style "No Brush

Re: [Qgis-developer] API: fill style?

2015-06-16 Thread Tom Chadwin
Ah: brushStyle(). Got it. Thanks. Tom -- View this message in context: http://osgeo-org.1560.x6.nabble.com/API-fill-style-tp5211196p5211203.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list

[Qgis-developer] Guidance on plugin QSettings group

2015-06-17 Thread Tom Chadwin
qgis2web saves its settings via QSettings(). However, it currently simply saves a load of ungrouped individual settings, which doesn't seem sensible (and potentially could overwrite non-qgis2web settings). Is there a preferred QSettings() group convention for plugins, or should I just use "qgis2web

Re: [Qgis-developer] Guidance on plugin QSettings group

2015-06-18 Thread Tom Chadwin
Perfect - I've implemented it as described. Thanks for the help, Richard. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Guidance-on-plugin-QSettings-group-tp5211418p5211646.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.

Re: [Qgis-developer] ELSE expression is used when other rules are set not visible - Feature or Bug?

2015-06-20 Thread Tom Chadwin
Surely if a layer is unchecked in the legend, none of its features should show, regardless of symbology or renderer. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/ELSE-expression-is-used-when-other-rules-are-set-not-visible-Feature-or-Bug-tp5211905p5212104.html Sent from

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-06-22 Thread Tom Chadwin
I've got a bit further with this, but have an embarrassingly basic question. I'm using Tim's Plugin Builder's run-env-linux.sh, but the default QGIS path doesn't seem to match where Travis installs QGIS to - is Travis running Ubuntu? Can anyone tell me what QGIS path I should pass to run-env-linux.

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-06-22 Thread Tom Chadwin
aille [via OSGeo.org]" Date: 22/06/2015 19:37 (GMT+00:00) To: Tom Chadwin Subject: Re: Using TravisCI integration in Github for QGIS Python plugin Have a look to the Travis config file in inasafe : https://github.com/AIFDR/inasafe/blob/develop/.travis.yml 2015-06-22 20:19 GMT+02:00 Tom Chadwin

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-06-24 Thread Tom Chadwin
I've got the build environment up now, I think - many thanks, all. However, does anyone know how I can get rid of the following test fail: QPixmap: Must construct a QApplication before a QPaintDevice I don't see QApplication instantiated anywhere. I'm not sure how to get past this, since the fail

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-06-24 Thread Tom Chadwin
So Google has told me repeatedly. My issues are: - I have not previously done this because the plugin works fine in QGIS, and this issue has only shown up in tests - I don't know how (or where) to instantiate QApplication (or QgsApplication?) -- View this message in context: http://osgeo-org.

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-06-24 Thread Tom Chadwin
I already had a similar get_qgis_app() function, but I was only using it to instantiate QgsApplication in tests which I thought had QIcon or QPixmap functionality. Adding it to all other tests has solved the problem. Thanks so much for your patience. -- View this message in context: http://osge

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-06-26 Thread Tom Chadwin
I suspect I'm not going to get this to work. I hit the problem that my plugin 's code used iface, which was not recognised. I managed to inject the dummy iface replacement created in the qgis_get_app () function mentioned above. However, next the code calls: ```python IFACE.legendInterface().group

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-06-29 Thread Tom Chadwin
Any instance of qgis_get_app() outside of /test is only my attempts to get his testing working, so I'll dig out the commit which put it there and revert it. I'll have a look at your guidance on implementing iface, but if you are able and interested to have a look as well, then of course I'd be extr

[Qgis-developer] "Time until" countdowns on qgis.org

2015-06-30 Thread Tom Chadwin
I'm sure someone has this in mind, but the countdowns on the QGIS home page to next feature freeze and release are both on 0 since we passed the release date. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Time-until-countdowns-on-qgis-org-tp5213549.html Sent from the Quan

[Qgis-developer] Is the new release schedule a success?

2015-06-30 Thread Tom Chadwin
This post is in no way a criticism of any of the QGIS team and their monumental efforts or their fabulous product. However, I thought someone should question how successful the four-monthly release schedule is. 2.8 immediately needed 2.8.1, and there seems to be the chance that 2.10 is immediately

Re: [Qgis-developer] Is the new release schedule a success?

2015-06-30 Thread Tom Chadwin
My point, if my understanding and memory of the last few months is correct, is that these two .1 releases have been required (2.8.1) or identified as required (2.10.1), before each .0 version has been fully released. My argument is that that is not the same as the normal caution about .0 versions,

Re: [Qgis-developer] Is the new release schedule a success?

2015-07-01 Thread Tom Chadwin
If the answer is that there is no way that the 2.8.0 and 2.10.0 bugs would ever have come to light before release, then sure, I accept the argument. However, Nyall says that one of the bugs was apparent as a test failure. Perhaps the best thing to do would have been to acknowledge that the flood of

Re: [Qgis-developer] Is the new release schedule a success?

2015-07-01 Thread Tom Chadwin
If it were my budget, then yes, I would consider it, so long as enough others did so as well, to get the hours required for it to have an effect. That figure is roughly the support for 1 year's support for a proprietary GIS for a single user (very roughly, from memory), so I would hope that many or

Re: [Qgis-developer] Is the new release schedule a success?

2015-07-01 Thread Tom Chadwin
> That is exactly why we have introduced long-term releases (LTR) for QGIS - for organizations that just need a stable QGIS for their work But the only .0 LTR so far (2.8) was not stable. > without having to worry about instabilities, testing and reporting bugs I understand that. I was simply r

Re: [Qgis-developer] Is the new release schedule a success?

2015-07-01 Thread Tom Chadwin
I do accept all your points. I am also probably confusing LTR with stable. Just because a .0 is LTR should not define it as more stable than a non-LTR .0. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Is-the-new-release-schedule-a-success-tp5213659p5213799.html Sent from

Re: [Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

2015-07-02 Thread Tom Chadwin
After lots of help and contributions from Akbar, I think this is now working. If anyone else would find the information useful, see: https://github.com/tomchadwin/qgis2web/issues/72 and https://github.com/tomchadwin/qgis2web/tree/LayerTree-API Many thanks, Akbar and everyone who has helped out

[Qgis-developer] Convert QGIS layer scale to OL3 resolution

2015-07-11 Thread Tom Chadwin
To implement scale-dependent visibility in qgis2web's OL3 output, I need to convert QGIS's layer.minimumScale() to ol.layer.Vector's minResolution. How? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Convert-QGIS-layer-scale-to-OL3-resolution-tp5215277.html Sent from the

Re: [Qgis-developer] Convert QGIS layer scale to OL3 resolution

2015-07-13 Thread Tom Chadwin
>From OL2'S scaleToResolution(): resolution = 1 / ((1 / scale) * (inches / map unit) * dpi) ie resolution = 1 / ((1 / scale) * (100 / 2.54) * 90.7) Is that right (for map unit = metre, and dpi = 90.7 [1])? Will this be correct only if the OL3 map's projection is in metres? Will I have to cha

Re: [Qgis-developer] Convert QGIS layer scale to OL3 resolution

2015-07-13 Thread Tom Chadwin
Sorry: inches PER map unit, or map unit / inch. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Convert-QGIS-layer-scale-to-OL3-resolution-tp5215277p5215487.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. __

[Qgis-developer] PyQGIS - detect layers without geometry

2015-08-10 Thread Tom Chadwin
When iterating through layers, how can I include vectors layers, exclude layers without geometry, and include rasters? At the moment, I have: try: if layer.type() == 0: testDump = layer.rendererV2().dump() code goes here except: pass This seems very ugly to me... -- View th

[Qgis-developer] Deliberate errors, but Travis passes

2015-09-08 Thread Tom Chadwin
I've implemented very basic Travis testing for the plugin qgis2web, and it's been working very well, catching code errors which result in Python errors. However, I'm now trying to expand the suite of tests to test the plugin against different data. The problem I have is that I now cannot get Travis

Re: [Qgis-developer] Deliberate errors, but Travis passes

2015-09-08 Thread Tom Chadwin
Hi Matthias This is the very early stages of implementing unittest. In time, I will test for expected results using assert methods. At the moment, though, all I want this to achieve is to catch Python errors, to prevent my making releases which crash. This is what I was doing before, and it worked

Re: [Qgis-developer] Deliberate errors, but Travis passes

2015-09-08 Thread Tom Chadwin
Hi Matthias Firstly, I'm not aware of a current segfault in the tests, so I'll keep an eye out for that. Yes, I am talking about exceptions thrown by Python. The deliberate error I have introduced is in the main function called when a map is exported in Leaflet format (ie not in Openlayers3). Thi

Re: [Qgis-developer] Changing ergonomy of the visibility of layers inside groups ?

2016-11-16 Thread Tom Chadwin
> You click on G ==> it becomes partially checked, and you restore StatePartial (ie A is unchecked and B is checked) [and earlier posts] I don't think I agree with this. I'll try to express how I would expect it to work: - the check state of a group is determined entirely by the check state of

Re: [Qgis-developer] Changing ergonomy of the visibility of layers inside groups ?

2016-11-16 Thread Tom Chadwin
I retract my comments completely until I get a chance to think it all through again... Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Changing-ergonomy-of-the-visibility-of-layers-inside-groups-tp52958

[Qgis-developer] symbol.symbolLayer(n) triggers RTTI error in one place, but doesn't in another

2016-11-21 Thread Tom Chadwin
QGIS 2.18, qgis2web leafletRefactor branch (https://github.com/tomchadwin/qgis2web/tree/leafletRefactor). - open a point layer - change marker type to SVG - start qgis2web - OpenLayers 3 preview works - click Leaflet in plugin dialog - RTTI error The error is triggered by: sl = symbol.symbolLa

Re: [Qgis-developer] symbol.symbolLayer(n) triggers RTTI error in one place, but doesn't in another

2016-11-21 Thread Tom Chadwin
Many thanks. I'd still like to know why the method consistently fails in one instance, and always works in the other, though. What's the timescale for 2.14.9? Thanks again Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org

Re: [Qgis-developer] symbol.symbolLayer(n) triggers RTTI error in one place, but doesn't in another

2016-11-21 Thread Tom Chadwin
> different imports Could be. I'll try to check. > different origin of the symbol objects Data in QGIS exactly the same, so I don't think so. > different symbols in use... Definitely not, for the same reason. - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this m

Re: [Qgis-developer] symbol.symbolLayer(n) triggers RTTI error in one place, but doesn't in another

2016-11-21 Thread Tom Chadwin
Assuming only QGIS imports are relevant, the working code imports iface, while the non-working doesn't. However, importing it doesn't stop the error. - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/symbol-sy

Re: [Qgis-developer] symbol.symbolLayer(n) triggers RTTI error in one place, but doesn't in another

2016-11-22 Thread Tom Chadwin
I'm afraid the Windows LTR nightly, with that commit, minidumps on that line now. Removing the line stops the dump. However, I've delved into this a lot further this morning, and I think it's a mistake I made some months ago. The dump no longer happens if I startRender() before it and stopRender()

Re: [Qgis-developer] Any UI/UX plans for QGIS3?

2016-11-25 Thread Tom Chadwin
If Alexandre is right, I'd love to help as well, if I can. - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Any-UI-UX-plans-for-QGIS3-tp5297396p5297434.html Sent from the Quantum GIS - Developer mailing list

Re: [Qgis-developer] Add virtual layer equivalent in Processing

2016-12-05 Thread Tom Chadwin
I think qgis-dev is now a zombie, as it's v2 master, where there has nor been any work for a while. - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Re-Add-virtual-layer-equivalent-in-Processing-tp5298535p52

Re: [Qgis-developer] should core plugins not be available in plugin manager?

2016-12-12 Thread Tom Chadwin
+1 In fact, if accepted, why call them plugins? - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/should-core-plugins-not-be-available-in-plugin-manager-tp5299556p5299567.html Sent from the Quantum GIS - Deve

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Tom Chadwin
Define "fail", I guess. Most plugins won't work without modification [citation needed], but it would be good to know *how* it fails, as you are right that there could be a more general issue. - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: htt

Re: [Qgis-developer] should core plugins not be available in plugin manager?

2016-12-16 Thread Tom Chadwin
Amy other plugins - currently core or not - which should also be migrated to core and stop being plugins at all? Or just Processing and DB Manager? I can't think of any. Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.15

Re: [Qgis-developer] Drag & Drop fails on Geopackage

2016-12-21 Thread Tom Chadwin
Giovanni Manghi wrote > I think that lately the very bad thing is that regression in between > point releases of LTR started to surface. > I strongly suggest that the paid bug fixing effort should be targeted > to 1) regressions 2) issues that we know cause crash or data > corruption in a replicabl

[Qgis-developer] Managing Javascript dependencies in Python plugin

2016-12-28 Thread Tom Chadwin
Hello all qgis2web writes or a load of Javascript, a lot of it third-party libraries - see the very end of the README (https://github.com/tomchadwin/qgis2web/blob/master/README.md#credits). I was hoping to find some way of managing these libraries - at the least keeping track of new versions as t

Re: [Qgis-developer] CI testing: the straight truth

2017-01-03 Thread Tom Chadwin
Matthias Kuhn-2 wrote > - Move dependencies into separate packages. We have some deps like >qspatialite that are built as part of QGIS which I think could be >installed as dependencies from a .deb. This will require quite a bit >of work: moving travis out of the container based infrast

[Qgis-developer] When to start converting our plugins?

2017-01-05 Thread Tom Chadwin
Hello all Amazing work going on for QGIS3 - I'm in awe of you all (as always). I've been getting more and more nervous about how easy it will be to convert my plugin, so yesterday I started to have a go. With lots of help from Matthias (huge thanks, as ever!), I got a good way through the process

Re: [Qgis-developer] When to start converting our plugins?

2017-01-05 Thread Tom Chadwin
Nyall Dawson wrote > I'd say just before/after feature freeze. Sounds sensible. Any ideas on how long between beginning of feature freeze and release? Could be *a lot* of plugin devs pleading for help from QGIS devs. Thanks again Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on

Re: [Qgis-developer] Channel network and drainage basins/ DLL file “gdal_MrSID.dll

2017-01-05 Thread Tom Chadwin
Do you have different Saga/GDAL versions? - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Channel-network-and-drainage-basins-DLL-file-gdal-MrSID-dll-tp5302246p5302259.html Sent from the Quantum GIS - Devel

Re: [Qgis-developer] When to start converting our plugins?

2017-01-06 Thread Tom Chadwin
Marco Bernasocchi wrote > I've already updated a rather large plugin some months ago. and created > a compatibilty layer plugin. have a look here Yes, Matthias pointed me towards it. I intend to use this so that I don't have to maintain parallel QGIS and 3 versions. Thanks! - Buy Pie Spy:

Re: [Qgis-developer] When to start converting our plugins?

2017-01-06 Thread Tom Chadwin
@Mathieu/Berhardt I'll try to write something up. No blog these days, but will put it somewhere and see if I can RSS it and get Planet to pick it up. - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/When-to

Re: [Qgis-developer] When to start converting our plugins?

2017-01-06 Thread Tom Chadwin
@Andreas I just want to have a 3-compatible version launched as soon as possible. I don't really want 3 to be released and have no version to accompany it. Yes, I could guarantee everything would work if I develop after release, but hopefully the feature freeze will give me and others time to conve

Re: [Qgis-developer] When to start converting our plugins?

2017-01-06 Thread Tom Chadwin
Richard Duivenvoorde wrote > Should we do a wiki page on github? > > https://github.com/qgis/QGIS/wiki By all means. All I would say is that anything I might write would be more conversational and less formal, not least because I would intend to mention things which real developers would take for

Re: [Qgis-developer] How to control map canvas "decorations" from Python ?

2017-01-06 Thread Tom Chadwin
Hi Bo Try: QgsProject.instance().readBoolEntry("ScaleBar", "/Enabled", False)[0] or something close to that. Thanks Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Channel-network-and-drainage-basin

[Qgis-developer] Donate to QGIS badge for plugin Github repos

2017-01-10 Thread Tom Chadwin
Hello all I've been meaning to add a donate button to my QGIS plugin's Github repo README. For anyone who might want to do the same thing, and who likes the common shields.io style of badges, just add the following: [![Donate to QGIS](https://img.shields.io/badge/donate%20to-QGIS-green.svg)](http

Re: [Qgis-developer] QGIS menu item

2017-01-10 Thread Tom Chadwin
There is an established generic menu order in Windows: File Edit View Help We shouldn't unthinkingly deviate from this unless we are confident the change represents a UX improvement. I would recommend not pushing Edit further to the right. I believe similar conventions exist on other OSes. Tom

Re: [Qgis-developer] QGIS menu item

2017-01-11 Thread Tom Chadwin
ginetto wrote > I would suggest to use the same vertical "..." menu used in Chrome, > Firefox, OpenLayers etc etc as in the attached image. Many investigations have shown *decreased* usability when menu items are "hidden" in a hamburger menu. First example from a simple Google search: https://www

Re: [Qgis-developer] CI testing: the straight truth

2017-01-11 Thread Tom Chadwin
Brilliant result - thanks to both Matthias and the Travis team. Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Travis-The-job-exceeded-the-maximum-time-limit-for-jobs-and-has-been-terminated-tp5301763p

[Qgis-developer] Create memory layer containing only features visible in current canvas extent

2017-01-12 Thread Tom Chadwin
Hello all I currently create a memory layer from an existing layer as follows ('usedFields' is a subset of the original layer's attributes/fields): newlayer = QgsVectorLayer(uri, layer.name(), 'memory') writer = newlayer.dataProvider() outFeat = QgsFeature() for feature in layer.getFeatures():

Re: [Qgis-developer] Create memory layer containing only features visible in current canvas extent

2017-01-12 Thread Tom Chadwin
I've found this method: viewportPolygon = QgsGeometry().fromWkt(iface.mapCanvas().extent().asWktPolygon()) layer = iface.activeLayer() resultlayer = QgsVectorLayer("Polygon", "result", "memory") resultlayer.dataProvider().addAttributes(list(layer.dataProvider().fields())) clippedFeatures = [] fo

Re: [Qgis-developer] Create memory layer containing only features visible in current canvas extent

2017-01-12 Thread Tom Chadwin
This looks ideal. Thanks, both. Plus I could make ExactIntersect an option in the GUI, as sometimes dotted could be more critical than accuracy. Thanks again Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble

Re: [Qgis-developer] Create memory layer containing only features visible in current canvas extent

2017-01-13 Thread Tom Chadwin
Many thanks, Matthias and Martin - I got it working exactly as you suggested. Is this the mechanism which QGIS itself uses to determine which features are in the viewport? I'm running into some performance issue which I thought this would help, but they are not solved yet, so I might soon have a m

Re: [Qgis-developer] plugin VDLTools : invalid syntax ?

2017-01-16 Thread Tom Chadwin
I get: No module named Qwt5.Qwt I'm on 2.18.2/Win7x64 Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/plugin-VDLTools-invalid-syntax-tp5303571p5303580.html Sent from the QGIS - Developer mailing list

[Qgis-developer] Reverse-engineer .ui from ui.py

2017-01-16 Thread Tom Chadwin
I am assuming the answer is no, but is it possible automatically to reverse engineer a .ui from a .py file which was originally created using pyuic4? - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Reverse-e

Re: [Qgis-developer] Valid or invalid geom in PostGIS?

2017-01-17 Thread Tom Chadwin
> you can disable in QGIS the server-side simplification of that layer to only enable the local simplification The huge benefit of the feature implementing server-side simplification is the reduction in data downloaded. Yes, we can do as you say, but we'll lose that benefit. It will be interestin

Re: [Qgis-developer] Add About sections to Plugin approval notification mails ?

2017-01-23 Thread Tom Chadwin
I tried to do this myself, but couldn't find my way round the repo code (not a Django person). +1 for this, together with a link to the repo. - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Add-About-section

[Qgis-developer] WMS metadata() in non-English locale

2017-01-31 Thread Tom Chadwin
I am trying to retrieve the WMS version of a layer, and am just parsing its metadata(), as no other solution was suggested here: http://gis.stackexchange.com/questions/213817/get-wms-version-from-qgis-layer-in-python However, what does metadata() return if the user's locale is not English? In oth

Re: [Qgis-developer] WMS metadata() in non-English locale

2017-01-31 Thread Tom Chadwin
So is there a solution? Is there a way to retrieve the WMS version of a layer which will work in all locales? Thanks Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-metadata-in-non-English-locale-

Re: [Qgis-developer] WMS metadata() in non-English locale

2017-02-01 Thread Tom Chadwin
I think that's exactly what metadata() does. Perhaps I need to issue a new getCapabilities request to the server, but fake/force an English locale? I don't know how.. - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.na

Re: [Qgis-developer] QGIS 3 master available in OSGeo4W! Youhou....

2017-02-06 Thread Tom Chadwin
Really great news. Thanks so much, Juergen! Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/QGIS-3-master-available-in-OSGeo4W-Youhou-tp5306459p5306472.html Sent from the QGIS - Developer mailing list a

Re: [Qgis-developer] Outline/border -> stroke?

2017-02-07 Thread Tom Chadwin
Definitely "stroke", both because it is the standard term in graphics software, and also because neither "border" nor "outline" make any sense in a line. I agree that a dark grey would be a better choice of default stroke than black: https://www.google.co.uk/webhp?sourceid=chrome-instant&ion=1&es

[Qgis-developer] XYZ layers are not a type of WMS

2017-02-07 Thread Tom Chadwin
I don't know what others think, but I think incorporating the new XYZ tile layers support in the GUI by using WMS as a "parent" layer type is incorrect: 1. they are a different kind of layer (and I presume not an OGC standard) 2. it hides the support for XYZ layers in QGIS from the user What do o

[Qgis-developer] Get raster (specifically XYZ) transparency in Python

2017-02-08 Thread Tom Chadwin
Hello all Soory for another "how do I get this via the API" question. How do I get an XYZ layer's transparency in Python ("Global transparency" in layer properties/style pane)? How about for WMS and local raster layers? Thanks Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Ama

Re: [Qgis-developer] Get raster (specifically XYZ) transparency in Python

2017-02-09 Thread Tom Chadwin
Got it - it's the renderer, not the layer itself: QgsRasterLayer.renderer().opacity() - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Get-raster-specifically-XYZ-transparency-in-Python-tp5307006p5307143.htm

Re: [Qgis-developer] running processing tests for processing algorithms on windows

2017-02-13 Thread Tom Chadwin
I've not tried it myself, but there are some instructions here: https://github.com/inasafe/inasafe/wiki/Development-under-Windows - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/running-processing-tests-for

[Qgis-developer] Correct Mac OS parameters for processing.runalg("gdalogr:warpreproject", params)

2017-02-17 Thread Tom Chadwin
Hello all Some Mac (I think) users of qgis2web are experiencing problems with raster exports: https://github.com/tomchadwin/qgis2web/issues/148#issuecomment-250157682 http://gis.stackexchange.com/questions/227049/cannot-export-raster-with-qgis2web-or-qgis2leaf The raster export code tries a num

  1   2   3   4   5   6   7   >