Re: [QGIS-Developer] Updating a layer's datasource in python

2018-09-25 Thread Denis Rouzaud
Hi Olivier, I have been playing with this and I think you should use the source on the layer and not on the data provider. Here is some code (which also modifies the style of the layer) https://github.com/QGEP/customizer/blob/master/customizer.py#L129-L141 I was doing a layer.reload() after

Re: [QGIS-Developer] Updating a layer's datasource in python

2018-09-25 Thread Nyall Dawson
On Wed, 26 Sep 2018 at 09:02, Olivier Dalang wrote: > > Dear List, > > As simple as it sounds, I'm struggling with changing the datasource of layers > with python : > > layer1 = QgsVectorLayer('/path/to/a.shp') > QgsProject.instance().addMapLayer(layer1) >

[QGIS-Developer] Updating a layer's datasource in python

2018-09-25 Thread Olivier Dalang
Dear List, As simple as it sounds, I'm struggling with changing the datasource of layers with python : layer1 = QgsVectorLayer('/path/to/a.shp') QgsProject.instance().addMapLayer(layer1) layer1.dataProvider().setDataSourceUri('/path/to/b.shp') The layer successfully changes on map redraw.

Re: [QGIS-Developer] open atlas layout, using python

2018-09-25 Thread Nyall Dawson
On Tue, 25 Sep 2018 at 22:36, Raymond Nijssen wrote: > > 1. Can I open a layout window with a python command? designer = iface.openLayoutDesigner( layout ) > 2. Can I turn on "atlas preview" with a python command? You'd have to do some fragile code to do this. Basically: - get designer window

Re: [QGIS-Developer] [Qgis-psc] Fwd: Documentation writing

2018-09-25 Thread matteo
Hi Harrissou, thanks for reporting your ideas, probably nobody knows better than you "black areas" of the docs. What do other docs people think? I don't want to put too much wood in the fire, but maybe if we all agree, we can think to add some priority labels depending on the lack of documented

Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0

2018-09-25 Thread Helmut Kudrnovsky
>[...] >Caris LOTS: 14.737 km^2 >ArcMap: 14.727,446 km^2 >MapInfo:14.727,352 km^2 >GeoMedia: 14.726,443 km^2 >Planimeter: 14.722,522 km^2 >QGIS 3.2: 14.652,181 km^2 >QGIS 2.8: 14.652,181 km^2 >[...] >My suspicion is that the geodesic algorithm used by QGIS (and apparently GRASS) is

[QGIS-Developer] Exporting from QGIS to CAD format - is it possible to offer DWG export

2018-09-25 Thread rjwillson
Hi, The CAD import and export functions for QGIS 3x are already extremely impressive and in several ways exceed the import/export capability of ArcGIS desktop 10.5/6. As mentioned in a previous post the only function that the QGIS import can't handle yet is when the CAD file (dwg or dxf)

[QGIS-Developer] Plugin [1491] GIS4WRF approval notification.

2018-09-25 Thread noreply
Plugin GIS4WRF approval by pcav. The plugin version "[1491] GIS4WRF 0.12.0" is now approved Link: http://plugins.qgis.org/plugins/gis4wrf/ ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info:

[QGIS-Developer] Plugin [1048] Another DXF Importer / DXF2Shape Converter approval notification.

2018-09-25 Thread noreply
Plugin Another DXF Importer / DXF2Shape Converter approval by pcav. The plugin version "[1048] Another DXF Importer / DXF2Shape Converter 1.0.3" is now approved Link: http://plugins.qgis.org/plugins/AnotherDXF2Shape/ ___ QGIS-Developer mailing list

[QGIS-Developer] Plugin [578] Maps Printer approval notification.

2018-09-25 Thread noreply
Plugin Maps Printer approval by delazj. The plugin version "[578] Maps Printer 0.5" is now approved Link: http://plugins.qgis.org/plugins/MapsPrinter/ ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info:

Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0

2018-09-25 Thread Kristian Evers
Calvin, I am quite sure that Charles Karney holds an undisputed claim of the Most Accurate Geodesic Algorithm™. At least I haven’t come across any papers offering better accuracy. Google Earths figure of 14.672 km^2 is very similar to MapInfos spherical area calculation of 14.670 km^2, so for

Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0

2018-09-25 Thread C Hamilton
Kristian, Thanks for those calculations. Before this discussion I was contemplating doing a line and polygon measurement tool for Shape Tools by clicking on an existing shape and using geographiclib calculate the measurements, but if it is possible to replace the existing QGIS measuring functions

Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0

2018-09-25 Thread Kristian Evers
Right, here are the calculated areas as returned by a number of different GIS applications and the planimeter app of GeographicLib for reference: Caris LOTS: 14.737 km^2 ArcMap: 14.727,446 km^2 MapInfo:14.727,352 km^2 GeoMedia: 14.726,443 km^2 Planimeter: 14.722,522 km^2 QGIS 3.2:

[QGIS-Developer] open atlas layout, using python

2018-09-25 Thread Raymond Nijssen
1. Can I open a layout window with a python command? 2. Can I turn on "atlas preview" with a python command? Hope anyone knows! Kind regards, Raymond ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info:

Re: [QGIS-Developer] [Qgis-psc] Fwd: Documentation writing

2018-09-25 Thread DelazJ
Hi all (sorry for the cross-posting but it's because the call was made if I'm not wrong on all the three channels) Thanks to those that already applied and happy to see that Documentation repo will likely be lively in upcoming weeks. If that can help to attract more people, these are some of the

[QGIS-Developer] Plugin [1410] ImportPhotos approval notification.

2018-09-25 Thread noreply
Plugin ImportPhotos approval by pcav. The plugin version "[1410] ImportPhotos 1.4" is now approved Link: http://plugins.qgis.org/plugins/ImportPhotos/ ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info:

Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0

2018-09-25 Thread Mark Johnson
>> We use a direct port from GRASS: This may also be caused by: /* * From original rttopo documentation: * Tested against: * http://mascot.gdbc.gov.bc.ca/mascot/util1b.html * and * http://www.ga.gov.au/nmd/geodesy/datums/vincenty_direct.jsp */ QgsPointXY

Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0

2018-09-25 Thread Kristian Evers
It's not a small area, that's why I have been nitpicking ellipsoid area calculation algorithms! I did end up doing the calculations with geographiblib to get a reference to judge various other calculations by. It's a pain in the butt to extract the data from a polygon shapefile (or whatever)

Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0

2018-09-25 Thread Nyall Dawson
On Tue, 25 Sep 2018 at 16:59, Kristian Evers wrote: > > Hi Paolo, > > I have some rought notes that I can try to polish up a bit and share here. > I'll see if I can find the time for that today. I didn't get to the bottom of > the problem but I am leaning towards the issue being that QGIS uses an

Re: [QGIS-Developer] is_layer_active expression

2018-09-25 Thread Nyall Dawson
On Tue, 25 Sep 2018 at 16:43, Otto Dassau wrote: > > thanks for the info Nyall! Ok, PR opened. https://github.com/qgis/QGIS/pull/8016 But for reference -- I think what's going to be more useful for layout use is the 3.4 @map_layers variable. As noted in the earlier reply, some functions are

Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0

2018-09-25 Thread Kristian Evers
Hi Paolo, I have some rought notes that I can try to polish up a bit and share here. I'll see if I can find the time for that today. I didn't get to the bottom of the problem but I am leaning towards the issue being that QGIS uses an inferior algorithm to determine geodesics. Unfortunately I

Re: [QGIS-Developer] is_layer_active expression

2018-09-25 Thread Otto Dassau
thanks for the info Nyall! Regards, Otto Am Tue, 25 Sep 2018 16:37:38 +1000 schrieb Nyall Dawson : > On Mon, 24 Sep 2018 at 19:20, Otto Dassau wrote: > > > > Dear Devs, > > > > in QGIS 3 I found the expression "is_layer_active" within the copyright > > decoration very useful. I would like to

Re: [QGIS-Developer] is_layer_active expression

2018-09-25 Thread Nyall Dawson
On Mon, 24 Sep 2018 at 19:20, Otto Dassau wrote: > > Dear Devs, > > in QGIS 3 I found the expression "is_layer_active" within the copyright > decoration very useful. I would like to use this expression also within the > print composer, but it seems to be not available there. Confirmed -- fix

Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0

2018-09-25 Thread Paolo Cavallini
Hi Kristian, Il 09/25/2018 07:24 AM, Kristian Evers ha scritto: > > > On a related note, I have been meaning to raise a similar issue based > on QGIS’s not so accurate polygon-area-on-the-ellipsoid calculations. > A colleague of mine came across some differences between QGIS and > CARIS LOTS