Re: [Qgis-user] gps problem
I'm using java for my project -Original Message- From: Tim Sutton [mailto:[EMAIL PROTECTED] Sent: 16 Ocak 2008 Çarşamba 11:29 To: Tolga Tanriverdi Cc: qgis-user@lists.qgis.org Subject: Re: [Qgis-user] gps problem Hi 2008/1/15, Tolga Tanriverdi [EMAIL PROTECTED]: Hi I'm new to whole qgis thing and I'm trying to develop a gis application with using qgis but I want to use qgis as a command line tool Which language are you developing with - python or c++? Regards Tim so I have created the project with qgis gui and saved it as a qgis project, now what I want is to send qgis a gpx file for using it's gps addon and take the snapshot of the project as a png file with --snapshot parameter however I couldnt find any way to give gpx file name as a project parameter does anyone know how can i do that ? My second question is when I called qgis with --snapshot parameter a gui of qgis appears for an instance is there a way to stop this? Thanks Tolga Tanrıverdi Aydın Yazılım ve Elektronik Sanayii A.Ş Ağ Sistem Mühendisi (0312)2101565-134 ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user -- Tim Sutton QGIS Project Steering Committee Member - Release Manager Visit http://qgis.org for a great open source GIS openModeller Desktop Developer Visit http://openModeller.sf.net for a great open source ecological niche modelling tool Home Page: http://tim.linfiniti.com Skype: timlinux Irc: timlinux on #qgis at freenode.net Bu e-posta, mesaji alici kisminda belirtilmis olan kullanici icindir. Mesajin alicisi siz degilseniz dogrudan veya dolayli olarak mesaji kullanmayiniz, acmayiniz, dagitmayainiz, yazicidan dokumunu almayiniz veya herhangi bir kismini kopyalamayiniz. Yanlislikla bu mesaj size ulasmissa lutfen, siliniz ve tum kopyalarini yok ederek mesaji gonderene acilen haber veriniz. Bu mesaj icerisinde belirtilenler sadece gondericinin kisisel gorusleridir. Bu gorusler Aydın Yazılım ve Elektronik Sanayii A.Ş. (AYESAŞ)'ın goruslerini yansitmadigi gibi, AYESAŞ'ı baglayici da degildir. Bu mesajin iceriginde ya da eklerinde yer alan bilgilerin dogrulugu, butunlugu ve guncelligi AYESAŞ tarafindan garanti edilmemektedir ve bilinen viruslere karsi kontrolleri yapilmis olarak yollanan mesajin sitenizde yaratabilecegi zararlardan AYESAŞ sorumlu tutulamaz. This email is intended solely for the use of the individual or entity to whom it is adressed. If you are not the intended adressee of this message, you should not use, open, disseminate, distrubute, print or copy this e-mail. If you have received this email in error. please delete it from your system and notify the sender immediately. Aydın Yazılım ve Elektronik Sanayii A.Ş. (AYESAŞ) does not accept any legal responsibility whatsoever for the contents of this message. Any opinions contained in this message are those of the author and are not given or endorsed by the AYESAŞ. AYESAŞ does not warrant the accuracy, integrity and currency of the information transmitted with this message. This message has been detected for all known computer viruses thence AYESAŞ is not liable for the occurrence of any system corruption caused by this message. ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] python plugin action vs mode tool
gLine = QgsGeometry.fromPolyline( [ QgsPoint(1,1), QgsPoint(2,2) ] ) # buffer with distance 0.5, use 5 segments to approximate curves gBuffer = gLine.buffer(0.5, 5) print gBuffer.asPolygon() The buffer() method is a great starting point to create a geoprocessing plugin. At the moment we want to implement a geoprocessing plugin with functions like buffer, union, difference etc. At the moment we realised it with Shapely. But this approach with third party libs is not nice and would be obsolete when QGIS offers the mentioned methods. QGIS native methods() based on GEOS would be the much better approach! What are your plans? Do you plan to implement union(), difference(), intersect() and relate() as QgsGeometry methods? A second question. I want to create a dissolved buffer polygon. To achieve this it is neccessary to combine all single objects p.e. LineStrings to one MultiLineString before buffer(). How do I concatenate single Linstrings into one Multilinestring? Best Regards Horst Dr. Horst Düster GIS-Koordinator, Stv. Amtschef Kanton Solothurn Bau- und Justizdepartement Amt für Geoinformation SO!GIS Koordination Rötistrasse 4 CH-4501 Solothurn Telefon ++41(0)32 627 25 32 Telefax ++41(0)32 627 22 14 mailto:[EMAIL PROTECTED] http://www.agi.so.ch -Ursprüngliche Nachricht- Von: Martin Dobias [mailto:[EMAIL PROTECTED] Gesendet am: Mittwoch, 16. Januar 2008 23:41 An: Richard Duivenvoorde Cc: [EMAIL PROTECTED] Betreff: Re: [Qgis-user] python plugin action vs mode tool On Jan 16, 2008 8:42 PM, Richard Duivenvoorde [EMAIL PROTECTED] wrote: My 'problem': I've build a sort of XY-Info tool plugin, like the raster info plugin in the repository. But mine is suppossed to be a tool like the zoom tool, or the select tool: you click on the tool/plugin-button, the button gets activated/surpressed/darker, and keeps in that state until you select one of the other (zoom, select or info) tools. Current plugin-buttons do not get 'activated', when you click the plugin button it doesn't stay visually(!)'active', it's a clickclack button. To get the behaviour the only thing you have to do is to call map tool's setAction() or setButton() method. That will cause that when the tool is activated/deactivated, the associated action or button will get selected/delected. (This behaviour is implemented in QgsMapTool::activate() and QgsMapTool::deactivate() so that's why it's good to call them also if you reimplement these methods.) But still some details were not clear for me: for example it's not clear for me if you must make a new 'tool' when you want to make a plugin which does something with a click in the mapcanvas. No, you can use ready-made QgsMapToolEmitPoint tool and just connect to its gotPoint signal. Another question is the one about keeping a button 'activated'. I hope that one got answered above. My idea is to make some 'plugin-stubs' for different kind of simple plugins: eg starting with a very simple plugin which does not have an interaction with the map, to a tool like the xy-info tool which must handle a mouse click, and finally your copyright-plugin which was really helpful for me. But maybe a plugin stubb is not what I'm looking for: it's either to complicated because you want to make it technically useful, or it's to simple to be functionally useful. The idea was to hand beginners the first steps to to a really easy plugin. Probably the best way would be to create the same starting plugin as the template plugin written in c++. For the rest I think it's better to use code snippets... But maybe we need a code-snippets wiki page with questions like: - I want to keep de plugin button activated - I want to get hold of the active geometries of the active layer - I want to loop through all geometries of this layer - How do I test the type of a geometry - How do I make pixel coordinates from world coordinates and vice versa - How can I add a label to a (new) layer - How can I add a new geometry to a layer - How can I keep some project info by writing it to a project file etc etc. ... I should start this page myself maybe ... Well, some of those are already on PythonBindings wiki page, however some are probably missing :) I'll see what more could I add. For sure you can start a list of such simple tasks, we could address them with the code snippets. ps (referring to my buffer questions a while a go) if you point me to some 'easy' buffer algorithms, I'm ready to give C++ a try :-) ) Uhm, starting from r7986 you can use QgsGeometry::buffer() function that does exactly what you need :-) Obligatory snippet: gLine = QgsGeometry.fromPolyline( [ QgsPoint(1,1), QgsPoint(2,2) ] ) # buffer with distance 0.5, use 5 segments to approximate curves gBuffer = gLine.buffer(0.5, 5) print gBuffer.asPolygon() Enjoy! Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org
Re: [Qgis-user] bug : ECW raster not display correctly
Considering most of the raster features have been merged for 0.9.2, perhaps the best is filing bug reports using a beta release of 0.9.2 (once it is released, I understand developers are very busy) Most users (the ones able to test and file bug reports) don't even know what replicate against svn trunk is. Agus [EMAIL PROTECTED] escribió: Message: 5 Date: Wed, 16 Jan 2008 12:46:39 -0200 From: Tim Sutton [EMAIL PROTECTED] Subject: Re: [Qgis-user] bug : ECW raster not display correctly To: Jacolin Yves [EMAIL PROTECTED] Cc: qgis-user@lists.qgis.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 hi I would suggest to try to replicate against svn trunk first since Peter Ersts has merged in many changes and improvements for raster. If the problem still occurs please file a bug. Attaching (small .jpg) screenshots to the bug report if needed. Please be sure to provide descriptions of the images describing which are 'normal' and which have errors. Regards Tim -- Dr. Agustin Lobo Institut de Ciencies de la Terra Jaume Almera (CSIC) LLuis Sole Sabaris s/n 08028 Barcelona Spain Tel. 34 934095410 Fax. 34 934110012 email: [EMAIL PROTECTED] http://www.ija.csic.es/gt/obster ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] bug : ECW raster not display correctly
Hi, I thank it means to use QGIS trunk to test, am I wrong? If so, I will try to do it this week end. Y. Le Thursday 17 January 2008 13:16:26 Agustin Lobo, vous avez écrit : Considering most of the raster features have been merged for 0.9.2, perhaps the best is filing bug reports using a beta release of 0.9.2 (once it is released, I understand developers are very busy) Most users (the ones able to test and file bug reports) don't even know what replicate against svn trunk is. Agus [EMAIL PROTECTED] escribió: Message: 5 Date: Wed, 16 Jan 2008 12:46:39 -0200 From: Tim Sutton [EMAIL PROTECTED] Subject: Re: [Qgis-user] bug : ECW raster not display correctly To: Jacolin Yves [EMAIL PROTECTED] Cc: qgis-user@lists.qgis.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 hi I would suggest to try to replicate against svn trunk first since Peter Ersts has merged in many changes and improvements for raster. If the problem still occurs please file a bug. Attaching (small .jpg) screenshots to the bug report if needed. Please be sure to provide descriptions of the images describing which are 'normal' and which have errors. Regards Tim -- Yves Jacolin --- http://softlibre.gloobe.org ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] bug : ECW raster not display correctly
Hi 2008/1/17, Agustin Lobo [EMAIL PROTECTED]: Considering most of the raster features have been merged for 0.9.2, perhaps the best is filing bug reports using a beta release of 0.9.2 (once it is released, I understand developers are very busy) Most users (the ones able to test and file bug reports) don't even know what replicate against svn trunk is. True - although since Jacolin is using ecw etc I was guessing he had build QGIS and from source so hopefully I wasnt too far off the mark :-) Regards Tim Agus [EMAIL PROTECTED] escribió: Message: 5 Date: Wed, 16 Jan 2008 12:46:39 -0200 From: Tim Sutton [EMAIL PROTECTED] Subject: Re: [Qgis-user] bug : ECW raster not display correctly To: Jacolin Yves [EMAIL PROTECTED] Cc: qgis-user@lists.qgis.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 hi I would suggest to try to replicate against svn trunk first since Peter Ersts has merged in many changes and improvements for raster. If the problem still occurs please file a bug. Attaching (small .jpg) screenshots to the bug report if needed. Please be sure to provide descriptions of the images describing which are 'normal' and which have errors. Regards Tim -- Dr. Agustin Lobo Institut de Ciencies de la Terra Jaume Almera (CSIC) LLuis Sole Sabaris s/n 08028 Barcelona Spain Tel. 34 934095410 Fax. 34 934110012 email: [EMAIL PROTECTED] http://www.ija.csic.es/gt/obster ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user -- Tim Sutton QGIS Project Steering Committee Member - Release Manager Visit http://qgis.org for a great open source GIS openModeller Desktop Developer Visit http://openModeller.sf.net for a great open source ecological niche modelling tool Home Page: http://tim.linfiniti.com Skype: timlinux Irc: timlinux on #qgis at freenode.net ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Mapserver python plugin
On Jan 17, 2008, at 7:39 AM, Luca Casagrande wrote: Hello everybody, Inside 0.9.1 I have this error when running mapserver export tool: An error has occured while executing Python code: Traceback (most recent call last): File /home/doktoreas/.qgis//python/plugins/mapserver_export/ mapserverexport.py, line 81, in run exporter = Qgis2Map(self.dlg.ui.txtQgisFilePath.text(), self.dlg.ui.txtMapFilePath.text()) File /home/doktoreas/.qgis//python/plugins/mapserver_export/ms_export.py, line 37, in __init__ self.qgs = minidom.parse(/home/gsherman/test1.qgs) File /usr/lib/python2.5/site-packages/_xmlplus/dom/minidom.py, line 1915, in parse return expatbuilder.parse(file) File /usr/lib/python2.5/site-packages/_xmlplus/dom/expatbuilder.py, line 924, in parse fp = open(file, 'rb') IOError: [Errno 2] Nessun file o directory: '/home/gsherman/test1.qgs' I am using Ubuntu package from Tim repository, and the plugin was installed via the Installer Plugin. This has been fixed in trunk. You can fix it by editing ./python/ plugins/mapserver_export/ms_export.py and changing as follows: Index: ms_export.py === --- ms_export.py(revision 7994) +++ ms_export.py(working copy) @@ -34,7 +34,7 @@ self.project = projectFile self.mapFile = mapFile # create the DOM -self.qgs = minidom.parse(/home/gsherman/test1.qgs) +self.qgs = minidom.parse(projectFile) # init the other members that are not set by the constructor self.units = '' self.imageType = '' Thanks Luca ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- Gary Sherman Chair, QGIS Project Steering Committee -Micro Resources: http://mrcc.com *Geospatial Hosting *Web Site Hosting -Desktop GIS Book: *http://desktopgisbook.com We work virtually everywhere -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Mapserver python plugin
Finally somebody tests it :) I'll take a look. Sent from my BlackBerry® -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- Gary Sherman Chair, QGIS Project Steering Committee Micro Resources: http://mrcc.com *Geospatial Hosting *Web Site Hosting We work virtually everywhere -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- -Original Message- From: Luca Casagrande [EMAIL PROTECTED] Date: Thu, 17 Jan 2008 17:39:10 To:qgis-user@lists.qgis.org Subject: [Qgis-user] Mapserver python plugin Hello everybody, Inside 0.9.1 I have this error when running mapserver export tool: An error has occured while executing Python code: Traceback (most recent call last): File /home/doktoreas/.qgis//python/plugins/mapserver_export/mapserverexport.py, line 81, in run exporter = Qgis2Map(self.dlg.ui.txtQgisFilePath.text(), self.dlg.ui.txtMapFilePath.text()) File /home/doktoreas/.qgis//python/plugins/mapserver_export/ms_export.py, line 37, in __init__ self.qgs = minidom.parse(/home/gsherman/test1.qgs) File /usr/lib/python2.5/site-packages/_xmlplus/dom/minidom.py, line 1915, in parse return expatbuilder.parse(file) File /usr/lib/python2.5/site-packages/_xmlplus/dom/expatbuilder.py, line 924, in parse fp = open(file, 'rb') IOError: [Errno 2] Nessun file o directory: '/home/gsherman/test1.qgs' I am using Ubuntu package from Tim repository, and the plugin was installed via the Installer Plugin. Thanks Luca ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] python plugin action vs mode tool
On Jan 17, 2008 10:07 AM, Düster Horst [EMAIL PROTECTED] wrote: gLine = QgsGeometry.fromPolyline( [ QgsPoint(1,1), QgsPoint(2,2) ] ) # buffer with distance 0.5, use 5 segments to approximate curves gBuffer = gLine.buffer(0.5, 5) print gBuffer.asPolygon() The buffer() method is a great starting point to create a geoprocessing plugin. At the moment we want to implement a geoprocessing plugin with functions like buffer, union, difference etc. At the moment we realised it with Shapely. But this approach with third party libs is not nice and would be obsolete when QGIS offers the mentioned methods. QGIS native methods() based on GEOS would be the much better approach! What are your plans? Do you plan to implement union(), difference(), intersect() and relate() as QgsGeometry methods? Since adding the geometry operations is just simple passing the call to GEOS routines, I've added in r7994 more processing - difference, union, intersection, convex hull, symmetric difference. (we're in feature freeze but since these additions don't infere with any other part of QGIS I think it's ok to add them) A second question. I want to create a dissolved buffer polygon. To achieve this it is neccessary to combine all single objects p.e. LineStrings to one MultiLineString before buffer(). How do I concatenate single Linstrings into one Multilinestring? Well, you can create an instance of QgsMultiPolyline (which is in fact vector of vectors of points) and export one by one all geometries to it using QgsGeometry::asPolyline() and then saving them again as geometry using QgsGeometry::fromMultiPolyline(). So we're expecting a geoprocessing plugin soon ;-) Bye Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user