Re: [Qgis-developer] [Qgis-user] [Plugin presentation] LayerCombination
Man I wish this had existed about a year and a half ago. Especially the fact that it integrates into the composers too. I have always felt that was something that was needed - an easy way to edit the locked layers in a composer map - hence why I wrote a plugin for it. Think I may well not bother update the locked layers editor plugin to 2.0 seeing as you have made this. This is much better. James Fra: qgis-user-boun...@lists.osgeo.org [mailto:qgis-user-boun...@lists.osgeo.org] På vegne av Lene Fischer Sendt: 17. juli 2013 04:41 Til: Olivier Dalang Kopi: qgis-user; qgis-developer@lists.osgeo.org Emne: Re: [Qgis-user] [Plugin presentation] LayerCombination Wauuh What a plugin. Can't wait to use it. My studens work on big projects with many layers from differe nt timeperiods. This will help ! Good idea with the small video. Regards Lene Fischer Sendt fra min iPad Den 17/07/2013 kl. 01.51 skrev Olivier Dalang olivier.dal...@gmail.commailto:olivier.dal...@gmail.com: Dear Mailing list, I've been working on a python plugin called Layer Combinations, which I'd love to release as stable for QGIS 2.0 (it's still flagged as experimental). Since it's a workflow enhancement plugin, I thought it could be of some interest to most of you. If so, I invite you to try the latest version (0.8, requires QGIS nightly/master), and report any bugs or ideas on the tracker : https://github.com/olivierdalang/layerCombinations You'll find a small explanation of the plugin below, and a video trailer here : https://vimeo.com/70446444 Thanks for your attention ! Olivier ## LayerCombinations## It allows to store the visibility and the folding state of the layers in the legend in so called combinations. Those combination can then be restored, allowing to switch back and forth complex setups. The combinations can also be applied to composer maps. The link is dynamic, which means that if the combination is updated, the composer map will automatically reflect the modifications. I find it very handy for big projects with many layers and several print composers. Hope you like it ! ___ Qgis-user mailing list qgis-u...@lists.osgeo.orgmailto:qgis-u...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] get mean of pixel values within defined area around current mouse position
Hi, I wanted to give a short feedback. Finally my solution for qgis 1.8 with some help from Anita was to create a buffer polygon around the point as a memory layer and calculated the mean value with QgsZonalStatistics. Here is the code I used, maybe useful for others: from qgis.analysis import QgsZonalStatistics from PyQt4.QtGui import * vpoly = QgsVectorLayer(Polygon, pointbuffer, memory) feature = QgsFeature() feature.setGeometry( QgsGeometry.fromPoint(QgsPoint(3517601,5406205)).buffer(1,5)) provider = vpoly.dataProvider() vpoly.startEditing() provider.addFeatures( [feature] ) vpoly.commitChanges() stats=qgis.analysis.QgsZonalStatistics(vpoly,/path/to/rasterlayer.tif) stats.calculateStatistics(None) allAttrs = provider.attributeIndexes() provider.select(allAttrs) provider.nextFeature(feature) attrs = feature.attributeMap() for (k,attr) in attrs.iteritems(): if k==2: QMessageBox.information(qgis.utils.iface.mainWindow(),'Info',attr.toString()) Regards Otto Am Wed, 3 Jul 2013 09:36:45 +0200 schrieb Otto Dassau das...@gbd-consult.de: Hi Fred, thanks for the hints, A and B sound interesting - PostGIS is not an option here. One more question, because you already used these workarounds. What solution A or B should be more usable (faster) from your opinion, if I need to calculate the mean while moving the mouse over the map canvas? Regards Otto Am Tue, 2 Jul 2013 18:05:10 +0100 schrieb Fred Lehodey leho...@gmail.com: Hi, Not sure it's the best way but I did something similar with these workarounds: A - with gdal: 1 - the user click and you get your buffer. (already done) 2 - use gdalwarp with -cutline and *-*crop_to_cutline options to extract a new raster. (python subprocess) 3 - read the created raster in a numpy array to do all the statistics you need. B - with matplotlib: 1 - with the buffer: create an array of the vertices 2 - read the raster into another numpy array 3 - use the points_inside_poly function of matplotlib lib to create a numpy mask. Not tried but postgis raster should do the job. Hth, Fred On Tue, Jul 2, 2013 at 1:12 PM, Otto Dassau das...@gbd-consult.de wrote: Hi, for a qgis 1.8 plugin I would like to query the mean of pixel values of a raster layer within a defined buffer for the current mouse position (not for an existing point layer). For the buffer it works: ... feat.geometry().asPoint() (3.5176e+06,5.4062e+06) buff_geom = feat.geometry().buffer(1000, 5) buff_geom.asPolygon() [[(3.5186e+06,5.4062e+06), (3.51855e+06,5.4059e+06), (3.51841e+06,5.40562e+06), (3.51819e+06,5.4054e+06), (3.51791e+06,5.40525e+06), (3.5176e+06,5.4052e+06), (3.51729e+06,5.40525e+06), (3.51701e+06,5.4054e+06),...]] but now I try to find a solution to query the raster pixels within the buffer zone and calculate the mean, but I don't know how and if this is possible in QGIS 1.8 at all. I found QgsZonalStatistics, but that doesn't work for my task. Does anybody have a solution for this or a better idea, how to solve this? Thanks Otto ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- Geoinformatik Büro Dassau - http://www.gbd-consult.de FOSSGIS consulting , training , support and analysis Ackerstrasse 144c , D - 40233 Düsseldorf , Germany Tel: +49-(0)211-47468178 , Mobil: +49-(0)171-4687540 -- Community Advisor - QGIS Project Steering Committee ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] [Qgis-user] [Plugin presentation] LayerCombination
This is huge ! Thanks for this plugin. I think this should definitely be added as a core plugin (in 2.1) if other agree, of course Michael 2013/7/17 Stott James fmro...@fylkesmannen.no Man I wish this had existed about a year and a half ago. Especially the fact that it integrates into the composers too. I have always felt that was something that was needed – an easy way to edit the locked layers in a composer map – hence why I wrote a plugin for it. ** ** Think I may well not bother update the locked layers editor plugin to 2.0 seeing as you have made this. This is much better. ** ** James ** ** *Fra:* qgis-user-boun...@lists.osgeo.org [mailto: qgis-user-boun...@lists.osgeo.org] *På vegne av* Lene Fischer *Sendt:* 17. juli 2013 04:41 *Til:* Olivier Dalang *Kopi:* qgis-user; qgis-developer@lists.osgeo.org *Emne:* Re: [Qgis-user] [Plugin presentation] LayerCombination ** ** Wauuh What a plugin. Can't wait to use it. My studens work on big projects with many layers from differe nt timeperiods. This will help ! Good idea with the small video. ** ** Regards Lene Fischer Sendt fra min iPad Den 17/07/2013 kl. 01.51 skrev Olivier Dalang olivier.dal...@gmail.com : Dear Mailing list, ** ** I've been working on a python plugin called Layer Combinations, which I'd love to release as stable for QGIS 2.0 (it's still flagged as experimental). ** ** Since it's a workflow enhancement plugin, I thought it could be of some interest to most of you. If so, I invite you to try the latest version (0.8, requires QGIS nightly/master), and report any bugs or ideas on the tracker : https://github.com/olivierdalang/layerCombinations ** ** You'll find a small explanation of the plugin below, and a video trailer here : https://vimeo.com/70446444 ** ** Thanks for your attention ! ** ** Olivier ** ** ** ** ## LayerCombinations## ** ** It allows to store the visibility and the folding state of the layers in the legend in so called combinations. ** ** Those combination can then be restored, allowing to switch back and forth complex setups. ** ** The combinations can also be applied to composer maps. The link is dynamic, which means that if the combination is updated, the composer map will automatically reflect the modifications. ** ** I find it very handy for big projects with many layers and several print composers. ** ** Hope you like it ! ** ** ** ** ___ Qgis-user mailing list qgis-u...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list qgis-u...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Splash screen for 2.0
On 07/17/2013 08:52 AM, Andreas Neumann wrote: You probably have to blame me for using the modern Swisstopo map. I just like it better and I think they look prettier than the old black and white maps. Also it gives QGIS a more modern touch, I think. Especially the old Dufour maps are really looking very heavy or depressing, although they are also a piece of art on their own. what if we would do a composition of the 3 maps? maybe using blending modes? ciao -- Marco Bernasocchi http://opengis.ch ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] MD5 Hash Mismatch error during QGIS install
Hi All! I am unable to install qgis for android on my samsung note 8.0 due to an md5 hash mismatch error. So far I have not found any way to resolve it. Do you have any suggestions or is this a bug? Thanks! Samantha ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] QGIS compilation with Vexpress
i hav tried to compile QGIS 1.9 with VCExpress but not able to do it successfully.I tis throwing Microsoft incremental error every time.pls do the needful for resolving it. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] [Plugin presentation] LayerCombination
Hi Olivier, Really nice feature..Reminded me of the layer filters in AutoCAD.. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Plugin-presentation-LayerCombination-tp5066896p5066994.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] highlighting features
Hi, I'm working on issue 4819 and noticed that when a feature is selected, the pan is fast even with complex polygons whereas the pan slows down a lot when features are highlighted. My best guesses for the difference is: 1) pan operation use cached image for rendering in rendereV2 2) rendering style and/or pipeline is sufficiently different to cause delays (this would explain why refresh after pan drag/drop takes 4sec with highlighted feature, while cached image refresh takes only 2sec otherwise) The fix I can think about for this are either: 1) to introduce caching in QgsHighlight (therefore adding substantial complexity to this class). 2) to add the parameter highlighted (along with selected) to QgsFeatureRendererV2::renderFeature and get rid of QgsHighlight altogether (or at least deprecate it). What is the best option: caching in QgsHighlight, modifying renderFeature, or something I did not think about ? Thanks, V. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] MD5 Hash Mismatch error during QGIS install
which version are you installing? ciao On 07/17/2013 10:40 AM, Samantha Samuel wrote: Hi All! I am unable to install qgis for android on my samsung note 8.0 due to an md5 hash mismatch error. So far I have not found any way to resolve it. Do you have any suggestions or is this a bug? Thanks! Samantha ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- Marco Bernasocchi http://opengis.ch ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Coordination of Hackfest with FOSS4G
We've just been booking hotels and some confusion arose, because the Wiki says Travel to FOSS4G (Monday 17th). But the 17th is Tuesday already. Can you shortly confirm, what days exactly we'll be staying in Brighton and on what date the transport will take place. Thank you very much, Matthias On Don 30 Mai 2013 14:52:43 CEST, Saber Razmjooei wrote: Hi all, I think we will stick with the original plan as on the wiki. Regards, Saber -Original Message- From: qgis-developer-boun...@lists.osgeo.org [mailto:qgis-developer-boun...@lists.osgeo.org] On Behalf Of Tim Sutton Sent: 29 May 2013 15:48 To: Barry Rowlingson Cc: rich...@duif.net; qgis-developer@lists.osgeo.org Subject: Re: [Qgis-developer] Coordination of Hackfest with FOSS4G Hi On Wed, May 29, 2013 at 3:39 PM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Wed, May 29, 2013 at 11:19 AM, Richard Duivenvoorde rdmaili...@duif.net wrote: if I understand correctly, Tuesday 17 and Wednesday 18 are the hackdays of foss4g which normally were done after the conference. But now combined with the workshops which normally preceded the conference. My experience is that most core developers of the different foss4g projects show up on these days (and other interested shove by). QGIS hackfest was/is planned from 12 - 16 Isn't this perfectly planned? We first hack for 4 day full steam on QGIS, and then optionally 2 extra days with some extra new people (OR you can choose to attend another hackbof (I'm very interested in OpenLayers and MapProxy for example). I think there may be some confusion between the FOSS4G Hackathon and the Code Sprints... The Hackathon (Hack Days) is a thing sponsored by The Met Office where a bunch of random geeks get together to work on developing solutions to problems, guided mainly by Met Office ideas. The plan is to be similar to the NHS Hack Day (where geeks work on projects for health data and clinical procedure) or other Random Hacks of Kindness (RHOK) projects. The Code Sprint is intended to be a free space for open-source project devs and interested parties to get together and work on their projects. FOSS4G supplies the room and the electricity and phone numbers of local pizza places. We should be able to provide code sprint facilities during the main conference as well as the special code sprint day on the Sunday. Now, I'm not saying QGIS couldn't run a code sprint during the hackathon days (personally I think its a great idea, would have to run it past the committee and make sure there's space) but that's not what the hackathon is. http://2013.foss4g.org/programme/hackathon/ http://2013.foss4g.org/programme/code-sprint/ Personally I would prefer to have the QGIS hackfest independent from the FOSS4G - I think it will be a distraction on various levels to be at FOSS4G - QGIS developers will get lured away to other groups and random people will wander in and distract QGIS hackers from their geekery. If the hack days coincide with workshop days it would be doubly bad as those wanting to attend workshops would do so at the detriment to their QGIS hack time. I appreciate that there would also be some advantages to Pirmin's suggestion - encouraging interoperability with other projects and so on, but that could also be facilitated at BOF sessions in the FOSS4G conference. Regards Tim Hope that's all clear! Barry ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- Tim Sutton - QGIS Project Steering Committee Member (Release Manager) == Please do not email me off-list with technical support questions. Using the lists will gain more exposure for your issues and the knowledge surrounding your issue will be shared with all. Visit http://linfiniti.com to find out about: * QGIS programming and support services * Mapserver and PostGIS based hosting plans * FOSS Consulting Services Skype: timlinux Irc: timlinux on #qgis at freenode.net == ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that
[Qgis-developer] More ideas about package installation in R for SEXTANTE
Hi all We have been discussing some issues with packages in R, and I would like to share some ideas wth you The goal is to make package installation as easy and practical as possible, so scripts can run with minor settings I am thinking that a good solution would be to check for packages needed by a script, checking calls to library(). With that, package installation commands could be included, as it is done now with rgdal and raster, with a code like this 'tryCatch(find.package(rgdal), error=function(e) install.packages(rgdal, dependencies=TRUE))') replace rgdal with the lib the script uses...and it should be fine, right? two problems in here: 1) if the user has no permissions that will not work, but I can implement a way of checking what is needed and what is installed in case the algorithm fails, so I can inform the user to manually install the reuqired packages 2)to avoid installing things automatically, for users that might not like that behaviour, this can be turned off, so manual intallation is required. All this would go on the default lib path, since we agreed that it is a better option than having a custom one that might duplicate packages Comments are welcome Thanks in advance! Victor ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] New API: get attribute values from a PostGIS layer
Hi Stephan, We modified the postgis-workshop tutorial for qgis plugin development to use the new python api of qgis 1.9, there are examples of feature access in there: https://github.com/Oslandia/postgis-workshop Cheers, Vincent. On 17/07/2013 21:13, Stéphane Henriod wrote: Dear all I am trying to get into the new 2.0 API and am still facing issues for very basic stuff: getting the values of the attributes out of a PostGIS layer. Basically, it works (with the almost same code) in the Qgis python console, but I don't manage to get it to work in a stand-alone script. What I have so far is a PostGIS layer, that I load with: /uri = QgsDataSourceURI() uri.setConnection('localhost', '5432', 'db_name', 'user_name', 'password') uri.setDataSource('my_schema', 'my_table', 'the_geom') my_layer = QgsVectorLayer(uri.uri(),'myhospitals','postgres') / A quick test shows me that the layer has been successfully loaded: /if not my_layer.isValid(): print Layer failed to load! else: print Layer loaded successfully / I would assume that /for elem in my_layer.getFeatures():/ /print elem.attributes()/ should return the attributes in a usable format but, instead, I get: / / /[PyQt4.QtCore.QVariant object at 0xad37aca4, PyQt4.QtCore.QVariant object at 0xad37acdc, None, PyQt4.QtCore.QVariant object at 0xad37ad14]/ /[PyQt4.QtCore.QVariant object at 0xad37aca4, PyQt4.QtCore.QVariant object at 0xad37acdc, PyQt4.QtCore.QVariant object at 0xad37ad14, PyQt4.QtCore.QVariant object at 0xad37ad4c]/ /[PyQt4.QtCore.QVariant object at 0xad37aca4, PyQt4.QtCore.QVariant object at 0xad37acdc, PyQt4.QtCore.QVariant object at 0xad37ad14, PyQt4.QtCore.QVariant object at 0xad37ad4c]/ /[PyQt4.QtCore.QVariant object at 0xad37aca4, PyQt4.QtCore.QVariant object at 0xad37acdc, PyQt4.QtCore.QVariant object at 0xad37ad14, PyQt4.QtCore.QVariant object at 0xad37ad4c]/ Does anyone have an idea where the problem could lie? For those who speak French, the question is posted here as well: http://www.forumsig.org/showthread.php/37178-Nouvelle-API-r%C3%A9cup%C3%A9rer-les-valeurs-attributaires I am using Qgis 1.9.0 with Python 2.7 on Ubuntu 13.04 Thanks in advance for ideas and comments... Cheers Stéphane -- Le mot progrès n'aura aucun sens tant qu'il y aura des enfants malheureux -- Albert Einstein A journey does not need reasons. Before long, it proves to be reason enough in itself. One thinks that one is going to make a journey, yet soon it is the journey that makes or unmakes you. -- Nicolas Bouvier Photos de voyages, photos de montagne: http://www.henriod.info http://www.henriod.info/ ___ 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] New API: get attribute values from a PostGIS layer
Hey Stephane, This is because your standalone script doesn't use the new SIP API. I pushed a change last night so that now importing qgis will set the API to version to. All you need to do is make sure you import it first before any of the PyQt4 modules are. Before: from PyQt4.QtCore import * from qgis.core import * After from qgis.core import * from PyQt4.QtCore import * If you import PyQt4 first it will set the API to version 1 which you can't change after. - Nathan On Thu, Jul 18, 2013 at 5:13 AM, Stéphane Henriod s...@henriod.info wrote: Dear all I am trying to get into the new 2.0 API and am still facing issues for very basic stuff: getting the values of the attributes out of a PostGIS layer. Basically, it works (with the almost same code) in the Qgis python console, but I don't manage to get it to work in a stand-alone script. What I have so far is a PostGIS layer, that I load with: *uri = QgsDataSourceURI() uri.setConnection('localhost', '5432', 'db_name', 'user_name', 'password') uri.setDataSource('my_schema', 'my_table', 'the_geom') my_layer = QgsVectorLayer(uri.uri(),'myhospitals','postgres') * A quick test shows me that the layer has been successfully loaded: *if not my_layer.isValid(): print Layer failed to load! else: print Layer loaded successfully * I would assume that *for elem in my_layer.getFeatures():* *print elem.attributes()* should return the attributes in a usable format but, instead, I get: * * *[PyQt4.QtCore.QVariant object at 0xad37aca4, PyQt4.QtCore.QVariant object at 0xad37acdc, None, PyQt4.QtCore.QVariant object at 0xad37ad14] * *[PyQt4.QtCore.QVariant object at 0xad37aca4, PyQt4.QtCore.QVariant object at 0xad37acdc, PyQt4.QtCore.QVariant object at 0xad37ad14, PyQt4.QtCore.QVariant object at 0xad37ad4c]* *[PyQt4.QtCore.QVariant object at 0xad37aca4, PyQt4.QtCore.QVariant object at 0xad37acdc, PyQt4.QtCore.QVariant object at 0xad37ad14, PyQt4.QtCore.QVariant object at 0xad37ad4c]* *[PyQt4.QtCore.QVariant object at 0xad37aca4, PyQt4.QtCore.QVariant object at 0xad37acdc, PyQt4.QtCore.QVariant object at 0xad37ad14, PyQt4.QtCore.QVariant object at 0xad37ad4c]* Does anyone have an idea where the problem could lie? For those who speak French, the question is posted here as well: http://www.forumsig.org/showthread.php/37178-Nouvelle-API-r%C3%A9cup%C3%A9rer-les-valeurs-attributaires I am using Qgis 1.9.0 with Python 2.7 on Ubuntu 13.04 Thanks in advance for ideas and comments... Cheers Stéphane -- Le mot progrès n'aura aucun sens tant qu'il y aura des enfants malheureux -- Albert Einstein A journey does not need reasons. Before long, it proves to be reason enough in itself. One thinks that one is going to make a journey, yet soon it is the journey that makes or unmakes you. -- Nicolas Bouvier Photos de voyages, photos de montagne: http://www.henriod.info ___ 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] More ideas about package installation in R for SEXTANTE
Hi More broadly, it would also be nice if R could be provided 'out of the box' in our standalone installer for windows (and osgeo4w too I guess) - I know the complicated installation process prevents many users from 'giving it a try'. Regards Tim On Wed, Jul 17, 2013 at 9:22 PM, Victor Olaya vola...@gmail.com wrote: Hi all We have been discussing some issues with packages in R, and I would like to share some ideas wth you The goal is to make package installation as easy and practical as possible, so scripts can run with minor settings I am thinking that a good solution would be to check for packages needed by a script, checking calls to library(). With that, package installation commands could be included, as it is done now with rgdal and raster, with a code like this 'tryCatch(find.package(rgdal), error=function(e) install.packages(rgdal, dependencies=TRUE))') replace rgdal with the lib the script uses...and it should be fine, right? two problems in here: 1) if the user has no permissions that will not work, but I can implement a way of checking what is needed and what is installed in case the algorithm fails, so I can inform the user to manually install the reuqired packages 2)to avoid installing things automatically, for users that might not like that behaviour, this can be turned off, so manual intallation is required. All this would go on the default lib path, since we agreed that it is a better option than having a custom one that might duplicate packages Comments are welcome Thanks in advance! Victor ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- Tim Sutton - QGIS Project Steering Committee Member (Release Manager) == Please do not email me off-list with technical support questions. Using the lists will gain more exposure for your issues and the knowledge surrounding your issue will be shared with all. Irc: timlinux on #qgis at freenode.net == ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] New API: get attribute values from a PostGIS layer
You will need to get the nightly builds I'm not sure what time they are done for Ubuntu, but If you would like you can add this code (before any PyQt4 imports) into your code in the meantime: import sip try: apis = [QDate, QDateTime, QString, QTextStream, QTime, QUrl, QVariant] for api in apis: sip.setapi(api, 2) except ValueError: # API has already been set so we can't set it again. pass That will set the API version so you don't need to update just yet. - Nathan On Thu, Jul 18, 2013 at 8:10 AM, Stéphane Henriod stephane...@gmail.comwrote: Thanks a lot for your answer, I will try tomorrow. How can I check if my installed version is already taking your change into account? Cheers Stéphane Le 18 juil. 2013 à 00:05, Nathan Woodrow madman...@gmail.com a écrit : Hey Stephane, This is because your standalone script doesn't use the new SIP API. I pushed a change last night so that now importing qgis will set the API to version to. All you need to do is make sure you import it first before any of the PyQt4 modules are. Before: from PyQt4.QtCore import * from qgis.core import * After from qgis.core import * from PyQt4.QtCore import * If you import PyQt4 first it will set the API to version 1 which you can't change after. - Nathan On Thu, Jul 18, 2013 at 5:13 AM, Stéphane Henriod s...@henriod.info wrote: Dear all I am trying to get into the new 2.0 API and am still facing issues for very basic stuff: getting the values of the attributes out of a PostGIS layer. Basically, it works (with the almost same code) in the Qgis python console, but I don't manage to get it to work in a stand-alone script. What I have so far is a PostGIS layer, that I load with: *uri = QgsDataSourceURI() uri.setConnection('localhost', '5432', 'db_name', 'user_name', 'password') uri.setDataSource('my_schema', 'my_table', 'the_geom') my_layer = QgsVectorLayer(uri.uri(),'myhospitals','postgres') * A quick test shows me that the layer has been successfully loaded: *if not my_layer.isValid(): print Layer failed to load! else: print Layer loaded successfully * I would assume that *for elem in my_layer.getFeatures():* *print elem.attributes()* should return the attributes in a usable format but, instead, I get: * * *[PyQt4.QtCore.QVariant object at 0xad37aca4, PyQt4.QtCore.QVariant object at 0xad37acdc, None, PyQt4.QtCore.QVariant object at 0xad37ad14] * *[PyQt4.QtCore.QVariant object at 0xad37aca4, PyQt4.QtCore.QVariant object at 0xad37acdc, PyQt4.QtCore.QVariant object at 0xad37ad14, PyQt4.QtCore.QVariant object at 0xad37ad4c]* *[PyQt4.QtCore.QVariant object at 0xad37aca4, PyQt4.QtCore.QVariant object at 0xad37acdc, PyQt4.QtCore.QVariant object at 0xad37ad14, PyQt4.QtCore.QVariant object at 0xad37ad4c]* *[PyQt4.QtCore.QVariant object at 0xad37aca4, PyQt4.QtCore.QVariant object at 0xad37acdc, PyQt4.QtCore.QVariant object at 0xad37ad14, PyQt4.QtCore.QVariant object at 0xad37ad4c]* Does anyone have an idea where the problem could lie? For those who speak French, the question is posted here as well: http://www.forumsig.org/showthread.php/37178-Nouvelle-API-r%C3%A9cup%C3%A9rer-les-valeurs-attributaires I am using Qgis 1.9.0 with Python 2.7 on Ubuntu 13.04 Thanks in advance for ideas and comments... Cheers Stéphane -- Le mot progrès n'aura aucun sens tant qu'il y aura des enfants malheureux -- Albert Einstein A journey does not need reasons. Before long, it proves to be reason enough in itself. One thinks that one is going to make a journey, yet soon it is the journey that makes or unmakes you. -- Nicolas Bouvier Photos de voyages, photos de montagne: http://www.henriod.info ___ 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] More ideas about package installation in R for SEXTANTE
Sounds good, but I guess we could do that once we have a larger set of R scripts prepared. Otherwise, to use R from SEXTANTE, you actually have to know R, and in taht case you probably know how to install it... Are there any plans to put SAGA in the standalone version? That will definitely help users. It might need require some changes in SEXTANTE, though, to have it configured by default Cheers Victor 2013/7/18 Tim Sutton li...@linfiniti.com: Hi More broadly, it would also be nice if R could be provided 'out of the box' in our standalone installer for windows (and osgeo4w too I guess) - I know the complicated installation process prevents many users from 'giving it a try'. Regards Tim On Wed, Jul 17, 2013 at 9:22 PM, Victor Olaya vola...@gmail.com wrote: Hi all We have been discussing some issues with packages in R, and I would like to share some ideas wth you The goal is to make package installation as easy and practical as possible, so scripts can run with minor settings I am thinking that a good solution would be to check for packages needed by a script, checking calls to library(). With that, package installation commands could be included, as it is done now with rgdal and raster, with a code like this 'tryCatch(find.package(rgdal), error=function(e) install.packages(rgdal, dependencies=TRUE))') replace rgdal with the lib the script uses...and it should be fine, right? two problems in here: 1) if the user has no permissions that will not work, but I can implement a way of checking what is needed and what is installed in case the algorithm fails, so I can inform the user to manually install the reuqired packages 2)to avoid installing things automatically, for users that might not like that behaviour, this can be turned off, so manual intallation is required. All this would go on the default lib path, since we agreed that it is a better option than having a custom one that might duplicate packages Comments are welcome Thanks in advance! Victor ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- Tim Sutton - QGIS Project Steering Committee Member (Release Manager) == Please do not email me off-list with technical support questions. Using the lists will gain more exposure for your issues and the knowledge surrounding your issue will be shared with all. Irc: timlinux on #qgis at freenode.net == ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Map of QGIS contributors
Hey all, As part of my FOSS4G keynote on QGIS I would really like to show a map of the all, or as many as I can get, developers/contributors on our project. I think it will be good to show the world wide effort that goes into this project and how you might have a developer/contributor living next door :) I don't expect exact address of where you live. Just give me what ever you are most comfortable with, town level would be good if your comfortable with that so we can at least show spread. There will also be no names on the final map, although if people are keen for that we can always make a public version later. We have a map of the users on the plugins site which I turned into a printed one at http://www.flickr.com/photos/madmanwoo/8715654343/in/pool-qgis so I'm looking to do something like that for developers/contributors. This is not just for core developers, if you have submitted any code, doc updates, or patch, translations, this applies to you too. I'm thinking of highlighting the different types of contributes You help is very much appreciated. Regards, Nathan ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer