Re: [Qgis-developer] PostGIS plugins
On 10/26/2010 12:07 AM, Paolo Cavallini wrote: Il 25/10/2010 23:29, Martin Dobias ha scritto: On Thu, Oct 21, 2010 at 8:34 AM, Paolo Cavallini wrote: How does this sound? This sounds good. Thanks. So we go back to the question: - svn or git? - on osgeo or elsewhere? - trac, redmine, or other? I think it would be good to act now, so in Wroklaw we'll have all the pieces in place, and we can start hacking around it. All the best. Can I vote for OSGeo, Git and Trac ? -- Ivan Mincik, Gista s.r.o. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Problem loading Vector Layer
On Tue, Oct 26, 2010 at 3:22 AM, Martin Dobias wrote: > On Tue, Oct 19, 2010 at 4:45 PM, Jitendra kumar > wrote: > > Hello all, > > I am new to Python binding for QGIS. I have been having problem in > > getting a Vector Layer to be loaded. I typed the following on python > > console: > > > from qgis.core import * > layer=QgsVectorLayer("/path/to/shape/file.shp","layer","ogr") > > Failed to load > > > > The output is "Failed to load" which isn't very helpful and doesn't > specify > > the cause. I am not sure what is the problem. I have confirmed that > filepath > > is correct and the shp file can be opened in QGIS. I would appreciate if > > someone could help me solve the problem. > > Are you using python console within QGIS or do you open the python > interpreter from a terminal? In the latter case, you would have to > initialize qgis core library first by calling > QgsApplication.initQgis() otherwise it will not find the data > providers necessary for opening vector layers. > @Martin, I am glad you replied. I was actually using python interpreter from terminal. And, now I understand why I couldn't get it to work. It works fine now. It would be great if someone could make the error message more helpful. "Failed to load" wasn't very helpful ;) Thanks once again. Regards, Jitendra http://www.qgis.org/pyqgis-cookbook/intro.html#using-pyqgis-in-custom-application > > Martin > ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] PostGIS plugins
Hi, > Thanks. So we go back to the question: > - svn or git? > - on osgeo or elsewhere? > - trac, redmine, or other? I am not a PSC member nor a very dedicated QGIS dev yet, but here are my 2c on this topic, which would be a kiss approach. The main target for this repo is qgis and qgis plugin devs. I'd first say : if you want your tool to be used, use what the majority of them already know. And I think that's SVN and Trac. Learning a new tool just for this case looks like a strong disincentive to me, even if the new tools are ten times better. As for hosting, I'd tend to not multiply hosting, and keep administration tasks to the lowest possible level. That would probably mean OSGeo hosting I think ? Same here, having same tools than other osgeo projects helps lowering administration burden. That's just my humble opinion, sorry if it does not help a lot. Vincent -- Vincent Picavet - vincent.pica...@oslandia.com www.oslandia.com - Engineering your GIS ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] PostGIS plugins
Il 25/10/2010 23:29, Martin Dobias ha scritto: On Thu, Oct 21, 2010 at 8:34 AM, Paolo Cavallini wrote: How does this sound? This sounds good. Thanks. So we go back to the question: - svn or git? - on osgeo or elsewhere? - trac, redmine, or other? I think it would be good to act now, so in Wroklaw we'll have all the pieces in place, and we can start hacking around it. All the best. -- http://www.faunalia.it/pc ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Problem loading Vector Layer
On Tue, Oct 19, 2010 at 4:45 PM, Jitendra kumar wrote: > Hello all, > I am new to Python binding for QGIS. I have been having problem in > getting a Vector Layer to be loaded. I typed the following on python > console: > from qgis.core import * layer=QgsVectorLayer("/path/to/shape/file.shp","layer","ogr") > Failed to load > > The output is "Failed to load" which isn't very helpful and doesn't specify > the cause. I am not sure what is the problem. I have confirmed that filepath > is correct and the shp file can be opened in QGIS. I would appreciate if > someone could help me solve the problem. Are you using python console within QGIS or do you open the python interpreter from a terminal? In the latter case, you would have to initialize qgis core library first by calling QgsApplication.initQgis() otherwise it will not find the data providers necessary for opening vector layers. http://www.qgis.org/pyqgis-cookbook/intro.html#using-pyqgis-in-custom-application Martin ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] PostGIS plugins
On Thu, Oct 21, 2010 at 8:34 AM, Paolo Cavallini wrote: > > Hi Martin. > I agree that it is better either to integrate all tools into one or, perhaps > even > better, to have a modular approach, so it will be easier to add new tools. > I also agree that it is better to do this work before putting it into trunk, > but I > think we need a collaborative platform (a plugin SVN) where several devs can > cooperate (see the other mail). > So my suggestion could be rephrased as: let's put our plugins on an svn, and > start > merging them. Afterwards they can be moved to trunk. > How does this sound? This sounds good. Regards Martin ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] save project via python results in segfault
On Mon, Oct 25, 2010 at 4:13 PM, Richard Duivenvoorde wrote: > Martin Dobias wrote: >> Hi Richard >> >> On Sun, Oct 24, 2010 at 9:03 PM, Richard Duivenvoorde >> wrote: >>> p=QgsProject.instance() >>> p.setFileName(str("/home/richard/temp/bpprr.qgs")) >>> p.write() I have looked into this and I think I have fixed that issue successfully in r14434. It seems the problem was in not acquiring the python global interpreter lock and thus accessing python API while in an inconsistent state. Richard, Barry, please test whether it helps your plugins. Regards Martin ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Visibility analysis
This is also a problem for me. Is the dev on this list? Cheers, John On Oct 22, 2010, at 1:12 PM, Tim Sutton wrote: > Hi > > I also couldnt work out any number that was valid to put in there... > > Regards > > Tim > > On Thu, Oct 21, 2010 at 8:34 PM, Paolo Cavallini > wrote: >> Hi all. >> I keep on getting this error: >> >> Please enter a positive or zero height for observer >> >> even if I entered 100 or othe numbers. >> Any hint? >> All the best. >> -- >> Paolo Cavallini: http://www.faunalia.it/pc >> ___ >> 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 ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] 1.6 Copiapo Feature Freeze delay
Hi Tim, On Mon, 25. Oct 2010 at 11:46:22 +0200, Tim Sutton wrote: > I chatted with Marco (he was away on holiday for last week) and we propose to > wait until the end of the week for the feature freeze so he can make the > updates recommended by Martin to the RasterCalculator parser code. So please > consider the freeze delayed until Oct Sun 31 unless there is any objection? Also fine with we. Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-20 Dipl.-Inf. (FH) Rheinstraße 13Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de -- norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH Rheinstrasse 13, 26506 Norden GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502 ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] pg table inheritance
Il 25/10/2010 08:45, Bernhard Ströbl ha scritto: Hi Paolo, I am using table inheritance (spatial table). I have only one child per parent. Both parent and child load ok, opening the table in QGIS shows all attributes. System is: PostgreSQL 8.4.1 on 64-bit Linux, QGIS 1.5 on WinXP (OSGEO install) Thanks Bernhard. In the meantime I also tried rebuilding a clean db with a partent table with 10 child, and I also found no problem. So it must be something specific of that particular db (a pretty complicated one). So the good news is that QGIS works well even with advanced PostgreSQL features. All the best. -- http://www.faunalia.it/pc ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] save project via python results in segfault
Martin Dobias wrote: > Hi Richard > > On Sun, Oct 24, 2010 at 9:03 PM, Richard Duivenvoorde > wrote: >> p=QgsProject.instance() >> p.setFileName(str("/home/richard/temp/bpprr.qgs")) >> p.write() >> >> I've been looking at it by putting debug messages in cpp code, and to me >> it seems the crash appears when in >> qgspythonutilsimpl.cpp: 153: the method runString is called with the >> parameter "sys.path.append('/home/richard/temp')" > > I think this kind of crash happens probably always when Python calls > C++ and C++ again calls some Python code. I am not sure what exactly > happens and whether this is caused by PyQt/sip or python itself... ok, then would it be a workaround to add a python qgis-api method for this? Or will we have the same problem then? ( the QgsProject::write()-method emits a 'writeProject'-event which will be received by the python part again. isn't it? ). Otherwise, should we conclude that it is not possible to save a project via python then (and in case of mapserver plugin I would let user NOT use plugin without a saved project in the beginning anyway...)? Richard ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] 1.6 Copiapo Feature Freeze delay
Il 25/10/2010 11:46, Tim Sutton ha scritto: parser code. So please consider the freeze delayed until Oct Sun 31 unless there is any objection? +1 for me. All the best. -- http://www.faunalia.it/pc ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Load an editable layer as a read-only one
Hi Martin, sorry for this reply so late. On Thu, Oct 7, 2010 at 11:04 PM, Martin Dobias wrote: > Hi Giuseppe > > On Tue, Oct 5, 2010 at 1:12 AM, Giuseppe Sucameli > wrote: > > Hi devs, > > > > there is a way to load an editable layer without editing capabilities? > > I searched for a setCapabilities() method, but nothing. > > Reducing the layer capabilities would be useful, especially for plugins, > > obviously > > without adding new capabilities. > > > > In a C++ plugin I can extend the concrete DataProvider class. > > There is a way to do the same thing in a python plugin? Maybe creating a > > wrapper > > to the layer dataProvider? > > I am not aware of such functionality. But it would be possible to add > a pair of methods setReadOnly(bool) and isReadOnly() for the layers. > If set as read only, editing would be disabled. > I think this would be a nice feature for pyplugins developers. In this moment the only workaround to make a layer uneditable is creating a plugin window containing a new canvas, then adding the layer in this new canvas, but you can neither use useful tools (e.g all the newest selection tools) or qgis mainwindow capabilities (add layers, move layers, ...). I'm going to open a ticket on trac. Cheers. -- Giuseppe Sucameli ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] save project via python results in segfault
Hi Richard On Sun, Oct 24, 2010 at 9:03 PM, Richard Duivenvoorde wrote: > > p=QgsProject.instance() > p.setFileName(str("/home/richard/temp/bpprr.qgs")) > p.write() > > I've been looking at it by putting debug messages in cpp code, and to me > it seems the crash appears when in > qgspythonutilsimpl.cpp: 153: the method runString is called with the > parameter "sys.path.append('/home/richard/temp')" I think this kind of crash happens probably always when Python calls C++ and C++ again calls some Python code. I am not sure what exactly happens and whether this is caused by PyQt/sip or python itself... Martin ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] 1.6 Copiapo Feature Freeze delay
Hi All I chatted with Marco (he was away on holiday for last week) and we propose to wait until the end of the week for the feature freeze so he can make the updates recommended by Martin to the RasterCalculator parser code. So please consider the freeze delayed until Oct Sun 31 unless there is any objection? Regards -- 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
Re: [Qgis-developer] save project via python results in segfault
On Mon, Oct 25, 2010 at 8:44 AM, Barry Rowlingson wrote: > my autosave plugin has been crashing qgis since version 1.5 because it > uses essentially the same python code. I was pretty busy at the time > so I just disabled it and carried on. Haven't got back to it, but can > confirm the behaviour you are seeing. I notice that the file is being created with zero-length on my system, so the program must be getting into QgsProject:write and crashing there. There's a method for write() with a QFileInfo arg as well as the method with no args. Not sure if this is a problem, but I thought that kind of thing is handled by the SIP wrappers. I tried creating a QFileInfo object in python and calling :write but it still crashed, something like: f = QFileInfo("/tmp/foo.qgs") p = QgsProject.instance() p.write(f) *crash* I need to set up a Qgis build environment to get any further with this... Barry ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] save project via python results in segfault
On Sun, Oct 24, 2010 at 8:03 PM, Richard Duivenvoorde wrote: > Does this ring a bell with someone? > Should I be able to save a just started qgis project via python? Or > should I call some other methods first? ding dong on the bell ringing front: http://osgeo-org.1803224.n2.nabble.com/autosave-bugs-td5393598.html my autosave plugin has been crashing qgis since version 1.5 because it uses essentially the same python code. I was pretty busy at the time so I just disabled it and carried on. Haven't got back to it, but can confirm the behaviour you are seeing. Not sure why running sys.path.append should crash it, you can easily do import sys;sys.path.append("/tmp") in the console without crashing it, so the problem is elsewhere. I have a feeling its related to string handling - unicode, QStrings, or something. Having an autosave function that was supposed to protect you from crashes causing crashes was a very tragic circumstance! I'd like to fix it! Barry ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer