Re: [Qgis-developer] C++11 in QGIS
Hi Hugo, On Thu, 07. May 2015 at 10:17:55 +0200, Hugo Mercier wrote: Lots of methods in QGIS are now decorated with the C++11 override keyword. Which is good. But it is only enabled for gcc and Clang compilers (not under MSVC for instance). So ... what features of C++11 is allowed in QGIS source code ? Support in GCC/CLang is excellent and the version of Visual Studio used for the windows compilation (2010) has already support for some nice features. I'm thinking about auto, unique_ptr and move semantics especially ... I'd say all that don't break platforms we currently build for (ie. http://dash.orfeo-toolbox.org/index.php?project=QGIS). Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31 Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de QGIS release manager (PSC) GermanyIRC: jef on FreeNode signature.asc Description: Digital signature ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] C++11 in QGIS
Hi all, Lots of methods in QGIS are now decorated with the C++11 override keyword. Which is good. But it is only enabled for gcc and Clang compilers (not under MSVC for instance). So ... what features of C++11 is allowed in QGIS source code ? Support in GCC/CLang is excellent and the version of Visual Studio used for the windows compilation (2010) has already support for some nice features. I'm thinking about auto, unique_ptr and move semantics especially ... ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Processing and ftools (Proposal for hackfest)
Hi, Also, many ftools algorithms are terribly slow (e.g. dissolve), particularly when compared to the equivalent tools based on ogr2ogr, that Giovanni Manghi added to Processing a few months ago. It may worth considering the possibility of deleting some ftools algorithm in favor of the ogr2ogr based algorithms. I will try to add as many geoprocessing operations based on ogr2ogr/sql as I can, especialy the ones that are really slow in ftools. Anyway to be able to add the operations that involve more than 1 input layer it will be needed to add a method in processing to create (on the fly) virtual vectors (and in general this tool would benefit from other improvements like multi-attribute selection). I plan to discussa about this things in Denmark. cheers -- Giovanni Manghi http://naturalgis.pt/ giovanni.man...@naturalgis.pt * WebGIS development * QGIS/PostGIS Training * QGIS Support and Consulting * QGIS development Google+/Hangouts: giovanni.man...@gmail.com Giovanni is QGIS main tester and active member of its development team -- ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Processing and ftools (Proposal for hackfest)
Il 07/05/2015 07:43, Alexander Bruy ha scritto: Hi all, I interested in this too and will be available to help. Also maybe we should think about GDALTools? Seems all algorithms already available in Processing, so we can try to find solution to replace GDALTools too. Right. What I miss is the echo of the gdal command line. Throwing it away would be a pity IMHO. All the best. -- Paolo Cavallini - www.faunalia.eu QGIS PostGIS courses: http://www.faunalia.eu/training.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Processing and ftools (Proposal for hackfest)
2015-05-07 8:12 GMT+02:00 Paolo Cavallini cavall...@faunalia.it: Il 07/05/2015 07:43, Alexander Bruy ha scritto: Hi all, I interested in this too and will be available to help. Also maybe we should think about GDALTools? Seems all algorithms already available in Processing, so we can try to find solution to replace GDALTools too. Right. What I miss is the echo of the gdal command line. Throwing it away would be a pity IMHO. All the best. Agreed, I find the command line very useful and I often use the GUI just to build the command line that I use in the shell or in a script. -- Alessandro Pasotti w3: www.itopen.it ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] [Qgis-user] problems running processing.runalg('qgis:voronoipolygons', postgis-layer), processing.runalg('qgis:importintopostgis', ...)
Hi, 1. i try to run qgis' voronoipolygons algorithm from processing toolbox in a python script (processing-script or standalone) For testing I loaded a shape and a postgis layer to a QgsMapLayerRegistry. I can sucessfully run processing.runalg('qgis:voronoipolygons', shape-layer, 0, outShpVec) but processing.runalg('qgis:voronoipolygons', postgis-layer, 0, outShpVec) fails (with exit code 137 ). No message in debugging console in my IDE (PyCharm). Any idea or example why this does not work or how I can do further investigation? 2. I'm in trouble using the qgis:importintopostgis via script as well. It expects an Index of a registered postgis connection. How can I use this alg by passing the connection params directly or do I have to create an entry in QSettings() for that and how can I get the latest registered connection than? Thank you Marco 0x6A30F373.asc Description: application/pgp-keys ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Processing and ftools (Proposal for hackfest)
Right. What I miss is the echo of the gdal command line. Throwing it away would be a pity IMHO. All the best. Done. All GDAL and OGR algorithms have now a custom parameters dialog which shows the console call in a text box as you modify parameter values Please take a look at it (it is master now) and let me know if you have more ideas Cheers ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Processing and ftools (Proposal for hackfest)
Il 07/05/2015 13:24, Victor Olaya ha scritto: Right. What I miss is the echo of the gdal command line. Throwing it away would be a pity IMHO. All the best. Done. All GDAL and OGR algorithms have now a custom parameters dialog which shows the console call in a text box as you modify parameter values Please take a look at it (it is master now) and let me know if you have more ideas Thanks! Why not releasing a new version, for wider testing? We already have several improvements pending. All the best. -- Paolo Cavallini - www.faunalia.eu QGIS PostGIS courses: http://www.faunalia.eu/training.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Problem with the MySQL/GDAL implementation in QGIS
A few precisions: My current conclusions are: 1) the problem is likely in the implementation of MySQL/GDAL driver since QGIS 2.0 This should rather read : The problem is likely the implementation of OGR datasource management in QGIS since QGIS 2) The last version that worked fine was QGIS 1.8. 3) The connection string to mysql in GDAL can be limited to any particular table. If this is implemented in QGIS, it would be a great improvement for the performance. That would be at best a workaround. The real problem is the many openingclosing of OGR datasources which can be rather costly depending on the particular OGR driver I have big expectations from this list to finally understand why the described problem occurs and how it can be resolved, Best regards, Pavol ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- Spatialys - Geospatial professional services http://www.spatialys.com ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Problem with the MySQL/GDAL implementation in QGIS
Hi, I have a suspicion that the MySQL driver in QGIS is not working properly when the MySQL database contains more than one table. I made tests with pure command-line GDAL and this problem does not occur there. GDAL queries all the tables, but only once, at the opening of the dataset. QGIS however opens and quits the entire dataset for each row in a table that is accessed. If there are 34 rows in a table and it is a single table in the database, there will be 34 queries. If there are 80 tables in the same MySQL database and I want to show those 34 rows of one table/layer, then there will be suddenly 34x80 queries. Since this happens each time a layer is zoomed in or zoomed out, edited, or an attribute table needs to be opened, there are serious flaws in the performance as a consequence - up to the point that QGIS becomes not operational. I described the problem in depth here: http://gis.stackexchange.com/questions/135865/why-are-mysql-connections-extremely-slow-in-qgis-2-0-2-8-when-compared-to-qgi The logs can be found here: https://drive.google.com/folderview?id=0B1VM28puP8EPfmF2dGpjamVDWVZ6Vm1veHgtOElhY2lHb0ZTSlI1WXNuWWFvU3pRQmVLMTAusp=sharing I had a fruitful exchange on the gdal-dev mailinglist about this: http://osgeo-org.1560.x6.nabble.com/gdal-dev-Problems-with-MySQL-queries-in-GDAL-td5204406.html My current conclusions are: 1) the problem is likely in the implementation of MySQL/GDAL driver since QGIS 2.0 2) The last version that worked fine was QGIS 1.8. 3) The connection string to mysql in GDAL can be limited to any particular table. If this is implemented in QGIS, it would be a great improvement for the performance. I have big expectations from this list to finally understand why the described problem occurs and how it can be resolved, Best regards, Pavol ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Rendering active map symbol as QPixmap
Awesome, Thanks Nathan! On 8/05/2015, at 10:34 am, Nathan Woodrow madman...@gmail.com wrote: Hey Andrew, This is how I did it with Roam to get all the legend items for the layer: items = layer.rendererV2().legendSymbologyItems(ICON_SIZE) That will give you a list of:Text - Icon pairs if you are using the rule base renderer you get can the symbol for the rule and paint that into a pixmap, however note that one feature can have many symbols so you will have to use the method that returns a list for all the symbols. Depending on what you are doing legendSymbologyItems might give you what you need without extra work. - Nathan On Fri, 8 May 2015 at 07:00 Andrew McClure and...@southweb.co.nz wrote: Any takers for this one? I'd like to render the active symbol for a layer as a QPixmap in a dialog. I have got this far: s = layer().rendererV2() key = s.rootRule().findRuleByKey(s.rootRule().ruleKey()) This tells me the active rule key to be rendered but how to get the image data? Perhaps I am barking up the wrong tree here? Thanks ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Processing and ftools (Proposal for hackfest)
MOre cosmetics: the command would better be displayed in a text box, perhaps collapsed, within the dialog, rather than over it. Moreover, the help is missing (better use the upstream, as we do for grass), and this should be fixed before removing GDALTools. Overall, we are pretty close, nice to get rid of even more redundancy! Thanks. Il 07/05/2015 13:24, Victor Olaya ha scritto: Right. What I miss is the echo of the gdal command line. Throwing it away would be a pity IMHO. All the best. Done. All GDAL and OGR algorithms have now a custom parameters dialog which shows the console call in a text box as you modify parameter values Please take a look at it (it is master now) and let me know if you have more ideas Looks nice, thanks. Main issue: text cannot be selected and copied. Cosmetic issue: the box covers a good part of the dialog here. Moreover, in GDALTools one can edit the call by hand, adding and editing current parameters (not a crucial function, but I think it is useful). I think the same approach should be extended to other backends where appropriate (grass, saga, ...). Thanks a lot! Now the main issue seems to be the icons (if you have a look to Lecos subplugin of Processing, it is quite obvious they really make it easier to approach the commands. All the best, and again many thanks. -- Paolo Cavallini - www.faunalia.eu QGIS PostGIS courses: http://www.faunalia.eu/training.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Rendering active map symbol as QPixmap
Hey Andrew, This is how I did it with Roam to get all the legend items for the layer: items = layer.rendererV2().legendSymbologyItems(ICON_SIZE) That will give you a list of:Text - Icon pairs if you are using the rule base renderer you get can the symbol for the rule and paint that into a pixmap, however note that one feature can have many symbols so you will have to use the method that returns a list for all the symbols. Depending on what you are doing legendSymbologyItems might give you what you need without extra work. - Nathan On Fri, 8 May 2015 at 07:00 Andrew McClure and...@southweb.co.nz wrote: Any takers for this one? I'd like to render the active symbol for a layer as a QPixmap in a dialog. I have got this far: s = layer().rendererV2() key = s.rootRule().findRuleByKey(s.rootRule().ruleKey()) This tells me the active rule key to be rendered but how to get the image data? Perhaps I am barking up the wrong tree here? Thanks ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] shp cannot be styled
Hi all. This file: http://www.faunalia.eu/~paolo/qgis/result.zip resulting from processing.runalg(saga:gridstatisticsforpolygons,/tmp/RESULT.tif,/path/municipalities.shp,False,False,True,False,True,False,False,False,0,None) seems impossible to thematize on the basis of the ``Calculated`` column. If saved as a new shapefile, it is OK. Possibly SAGA produces a wrong dbf? Anyone confirms? Thanks. -- Paolo Cavallini - www.faunalia.eu QGIS PostGIS courses: http://www.faunalia.eu/training.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] shp cannot be styled
Hi Paolo, confirmed with master (f9f333b) 2015-05-07 19:52 GMT+03:00 Paolo Cavallini cavall...@faunalia.it: Hi all. This file: http://www.faunalia.eu/~paolo/qgis/result.zip resulting from processing.runalg(saga:gridstatisticsforpolygons,/tmp/RESULT.tif,/path/municipalities.shp,False,False,True,False,True,False,False,False,0,None) seems impossible to thematize on the basis of the ``Calculated`` column. If saved as a new shapefile, it is OK. Possibly SAGA produces a wrong dbf? Anyone confirms? Thanks. -- Paolo Cavallini - www.faunalia.eu QGIS PostGIS courses: http://www.faunalia.eu/training.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- Alexander Bruy ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] shp cannot be styled
Il 07/05/2015 19:02, Alexander Bruy ha scritto: Hi Paolo, confirmed with master (f9f333b) Ticket opened: https://hub.qgis.org/issues/12713 Thanks. -- Paolo Cavallini - www.faunalia.eu QGIS PostGIS courses: http://www.faunalia.eu/training.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] 2 additional options in the Spatial Query plugin need to be explained
Hello, I am currently working on the QGIS user manual 2.8 and deal with two options in the Spatial Query plugin we didn't explain so far: - invalid source (source with geometry errors?) - invalid reference While 'Result feature IDs' when having run the plugin is easy to understand we didn't manage to explain what the function of the other two options is. Can somebody help me? Cheers, Larissa ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] C++11 in QGIS
Hi Jürgen, On 07/05/2015 10:37, Jürgen E. Fischer wrote: Hi Hugo, On Thu, 07. May 2015 at 10:17:55 +0200, Hugo Mercier wrote: Lots of methods in QGIS are now decorated with the C++11 override keyword. Which is good. But it is only enabled for gcc and Clang compilers (not under MSVC for instance). So ... what features of C++11 is allowed in QGIS source code ? Support in GCC/CLang is excellent and the version of Visual Studio used for the windows compilation (2010) has already support for some nice features. I'm thinking about auto, unique_ptr and move semantics especially ... I'd say all that don't break platforms we currently build for (ie. http://dash.orfeo-toolbox.org/index.php?project=QGIS). Thanks for the clarification. But rules in the CMakeLists are a bit different: it enables C++11 only for g++ = 4.7 and for Clang (= 4.1 on mac and = 3.2 elsewhere). Does it mean we should always keep compatibility with non-c++11 compilers ? In this case, that means only features that have an equivalent in C++03 are allowed ... which limits a lot the interest. If we are ok to introduce c++11 features, it means we must state that a c++11 compiler is needed (and not only optional). At least features supported by the most limited one (MSVC 2010 in our case). ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] shp cannot be styled
Hi Paolo, Exact same problem here (QGIS testing on linux) and also solved after a save as shapefile. Regards, Raymond On 07-05-15 18:52, Paolo Cavallini wrote: Hi all. This file: http://www.faunalia.eu/~paolo/qgis/result.zip resulting from processing.runalg(saga:gridstatisticsforpolygons,/tmp/RESULT.tif,/path/municipalities.shp,False,False,True,False,True,False,False,False,0,None) seems impossible to thematize on the basis of the ``Calculated`` column. If saved as a new shapefile, it is OK. Possibly SAGA produces a wrong dbf? Anyone confirms? Thanks. -- Terglobo Ampèrestraat 110 5223 CT 's-Hertogenbosch 06-25314983 ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Processing and ftools (Proposal for hackfest)
Il 07/05/2015 13:24, Victor Olaya ha scritto: Right. What I miss is the echo of the gdal command line. Throwing it away would be a pity IMHO. All the best. Done. All GDAL and OGR algorithms have now a custom parameters dialog which shows the console call in a text box as you modify parameter values Please take a look at it (it is master now) and let me know if you have more ideas Looks nice, thanks. Main issue: text cannot be selected and copied. Cosmetic issue: the box covers a good part of the dialog here. Moreover, in GDALTools one can edit the call by hand, adding and editing current parameters (not a crucial function, but I think it is useful). I think the same approach should be extended to other backends where appropriate (grass, saga, ...). Thanks a lot! Now the main issue seems to be the icons (if you have a look to Lecos subplugin of Processing, it is quite obvious they really make it easier to approach the commands. All the best, and again many thanks. -- Paolo Cavallini - www.faunalia.eu QGIS PostGIS courses: http://www.faunalia.eu/training.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] shp cannot be styled
Il 07/05/2015 19:03, Raymond Nijssen ha scritto: Hi Paolo, Exact same problem here (QGIS testing on linux) and also solved after a save as shapefile. Thanks for confirmation, ticket open. All the best! -- Paolo Cavallini - www.faunalia.eu QGIS PostGIS courses: http://www.faunalia.eu/training.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer