Re: [Qgis-user] WMS in python?
On Mon, Mar 3, 2008 at 9:08 PM, Rob McCulley [EMAIL PROTECTED] wrote: Can a WMS Layer be added to an application built using the python bindings? I've tried to do it using a few variations of parameters with the QgsDataSourceURI(), but my lyr.isValid() is always false. Can I add a WMS Layer using the python bindings, and if so, how? It *should* be possible. There's a following constructor (available also from python) of raster layers which is used in case of WMS: QgsRasterLayer(int dummy, const QString baseName = QString(), const QString path = QString(), const QString providerLib = QString(), const QStringList layers = QStringList(), const QStringList styles = QStringList(), const QString format = QString(), const QString crs = QString(), const QString proxyHost = QString(), int proxyPort = 80, const QString proxyUser = QString(), const QString proxyPass = QString()); I have never done something with WMS so can't supply you with a working example, but to get an idea how to fill in the parameters, see QgisApp::addWmsLayer() and debug output from QgisApp::addRasterLayer() in src/app/qgisapp.cpp. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Compile error in qgsvectordataprovider.cpp
On Feb 12, 2008 1:28 AM, Mikhail Umorin [EMAIL PROTECTED] wrote: [...] libqgis_raster.so.1 = /usr/lib64/libqgis_raster.so.1 (0x2b8a4f998000) libqgis_legend.so.1 = /usr/lib64/libqgis_legend.so.1 (0x2b8a4fbcc000) libqgis_composer.so.1 = /usr/lib64/libqgis_composer.so.1 (0x2b8a4fdf9000) libqgsprojectionselector.so = /usr/lib64/qgis/libqgsprojectionselector.so (0x2b8a50067000) [...] This is evidence that you have installed also QGIS version 0.8 (probably from the package manager) because these libraries are not present anymore with QGIS versions 0.9.x. Remove the old installation and it should work. Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Compile error in qgsvectordataprovider.cpp
On Feb 11, 2008 7:34 PM, Mikhail Umorin [EMAIL PROTECTED] wrote: The first time I started the compiled QGis it opened the main window and gave an error message that north arrow pixmap could not be found. When I tried to load some DOQ into a new project it gave error messages that it could not read srs.db. Now that I try to launch QGis again it flashes splash screen and quits giving in the terminal window: [EMAIL PROTECTED] bin]$ ./qgis ./qgis: symbol lookup error: ./qgis: undefined symbol: _ZN10QgsMapTool9setActionEP7QAction [EMAIL PROTECTED] bin]$ What should I try to do? Uhm, this looks like a mismatched installation... Haven't you installed some earlier version of QGIS before? Please post here what this command outputs: ldd /usr/local/bin/qgis I would suggest you to do again make install to ensure that all parts of QGIS are installed correctly. Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Python Bindings and Labels
On Feb 9, 2008 3:17 AM, Tim Sutton [EMAIL PROTECTED] wrote: Hi You should be able to do something like this (untested estimate based on C++ api and sip definition file): myLayer.setLabelOn(true); QgsLabel myLabel = myLayer.label(), myLabel.setLabelField( QgsLabel.Angle, fieldIndex); Yes, this code should work, it's trivial to convert it to pythonic syntax. For an example of using labeling, take a look at tutorial 3: http://blog.qgis.org/?q=node/59 Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Compile error in qgsvectordataprovider.cpp
On Feb 5, 2008 8:21 PM, Mikhail Umorin [EMAIL PROTECTED] wrote: I included limits.h and passed through the problem (thanks, Martin!) but now I have another one: [ 10%] Building CXX object src/core/CMakeFiles/qgis_core.dir/spatialindex/qgsspatialindex.o In file included from /var/Archives/qgis_0.9.1/src/core/spatialindex/qgsspatialindex.cpp:23: /var/Archives/qgis_0.9.1/src/core/spatialindex/include/SpatialIndex.h:191: error: multiple parameters named 'in' In file included from /var/Archives/qgis_0.9.1/src/core/spatialindex/include/SpatialIndex.h:207, from /var/Archives/qgis_0.9.1/src/core/spatialindex/qgsspatialindex.cpp:23: /var/Archives/qgis_0.9.1/src/core/spatialindex/include/RTree.h:78: error: multiple parameters named 'in' make[2]: *** [src/core/CMakeFiles/qgis_core.dir/spatialindex/qgsspatialindex.o] Error 1 make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2 make: *** [all] Error 2 You can edit those 2 files and change the second parameter's name to something different (e.g. in2) so they're not the same: - src/core/spatialindex/include/SpatialIndex.h : line 191 - src/core/spatialindex/include/RTree.h : line 78 I am using gcc 4.3: gcc (GCC) 4.3 20070713 (experimental) (4.3-0.20070713.5mdv2008.0) Seems like new GCC is more strict than the older versions :-) I'm going to apply the patches to SVN for the further versions. Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] python plugin on windows
On Feb 1, 2008 10:42 AM, Tim Sutton [EMAIL PROTECTED] wrote: Also in the future we (ok probably python gurus like Martin co) could probably provide some kind of integrated development environment embedded in QGIS so that you can avoid the command line all togethergive it some time as its still early days in the QGIS Python bindings development. Actually, I'm not much in favour of building an IDE for Python in QGIS as that sounds like reinventing of what have been already done. Probably more appropriate would be to improve the instructions for creating plugin - once we have good instructions, developers can choose IDE of their preference. Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] error using the stand alone app Oceanmap
On Jan 29, 2008 11:53 PM, Tim Michelsen [EMAIL PROTECTED] wrote: 2. try to find QGIS in some default paths (/usr, /usr/local on linux or ${PROGRAM_FILES}/Quantum GIS on windows etc.) or try to use a previously saved path to QGIS installation from QSettings 3. if no installation has been found, fire up a simple UI in PyQt and let the user select the installation directory. I would like to come up with something in the same direction: In both apps presented in this thread everything seems to be relying on the path that is hardcoded into qgislite.py and mainwindow.py repectivly. The variable used is qgis_prefix = /usr/local/qgis_svn (line 55). I do not use a svn version of qgis. Instead I use the Ubuntu packages: whereis qgis qgis: /usr/bin/qgis /usr/lib/qgis /usr/share/qgis Due to some to me unknown reason, the standalone apps and python tutorials only work on my Ubuntu box when I set the path as follows: qgis_prefix = /usr I would recommend to use the where command for linux systems to get the install folder. Some pseudocode: test if on linux execute in bash `whereis qgis` whereis_output = read output from that command qgis_prefix = whereis_output if on windows use the approach Martin pointed out: (${PROGRAM_FILES}/Quantum GIS note that some users like to change the default install folder to something like c:\programms\qgis else (installation folder can't be found open a gui folder selection dialog and let the user select it. Maybe I haven't explained it well, but this is what I meant, just without running whereis utility. Since it just looks to /usr and /usr/local directories we don't have to run it and look there by ourselves. As a workaround we could use a configuration.py file. There we set the paths and the parameters for the app: cat configuration.py qgis_prefix = /usr startup_project = ./data/mycustomproject.qgs So if you deliver the app and your users have problems to start the program they'd only need to modify this configuration file and wouldn't need to mess up with the rest. Yes, script with just configuration is a simpler variant of a bootstrap script. In fact we should be able to support also gui-less configuration (since qgis libraries can be used also without gui). I think what the maximum would be to achieve real stand alone apps: ship a directory with these resources in the app. |-- LICENSE.TXT |-- Makefile |-- README.TXT |-- core |-- data |-- qgis_common |-- qgislite.py `-- tools Then every needed file could be put into the common directory (qgis_common). And we are totally independant of a QGIS install. Right, this is suitable for windows. But I would say that e.g. for linux it's more appropriate to ship standalone apps and let the user install the libraries with package manager. In case of using many stand alone apps one would put the qgis_common somewhere else and refernce it with the qgis_prefix variable. Well, this are just some ideas. They only based on brainstorming and didn't undergo testing here ;-) Hope you like them. Of course thanks for ideas! Regards Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] error using the stand alone app Oceanmap
On Jan 29, 2008 4:51 PM, Aaron Racicot [EMAIL PROTECTED] wrote: 3) You can play with a new project I am starting to develop called QGISLite. It can be found here: http://trac.reprojected.com/qgislite/ The intention of this project is to create a very minimal GIS app based on the python bindings to QGIS that stand alone apps can be built against. I just started that one, but look forward to adding to it. The SVN for that one is: http://svn.reprojected.com/qgislite/trunk/ Aaron, QGISLite looks nice :-) What will be the way to build standalone apps against QGISLite? Are you going to implement QgisInterface so that regular python plugins for QGIS could be used or use some other way? Btw. it has been crashing for me when exiting (on linux) - the reason is that garbage collection first deletes QApplication instance and later before destruction of something related to QgsMapCanvas (don't know what so far) wants to paint to QPixmap and that's not possible anymore. This behaviour was happening also in the tutorials ported to python. This may be caused by the merge of incremental rendering support but I'm not sure. Anyway, it's possible to workaround it by creating application in one function and then doing the rest of initialization in other fuction so that first python will collect all gui-related stuff and at last the application, i.e.: def doInit(): app = QApplication(sys.argv) initApp(app) def initApp(app): # ... stuff ... At last one thought: What sucks about custom qgis-based application is the need to find out the QGIS installation and set the paths to PyQGIS, QGIS libs and QGIS resources. It comes to my mind that we could possibly do a simple bootstrap python script that application could use. The bootstrap script could work as follows: 1. check availability of PyQt4. if not available, quit gracefully and tell the user about the problem in a way that they can understand it 2. try to find QGIS in some default paths (/usr, /usr/local on linux or ${PROGRAM_FILES}/Quantum GIS on windows etc.) or try to use a previously saved path to QGIS installation from QSettings 3. if no installation has been found, fire up a simple UI in PyQt and let the user select the installation directory. If the user doesn't have QGIS installed at all, it could guide him to download and install it for his platform - or even just download the necessary files like libraries, providers and some resources like SRS database. 4. check whether the QGIS version is compatible (i.e. = 0.9) 5. if everything is correct, let's set path to the bindings (modify sys.path), path to the libraries (os.environ['LD_LIBRARY_PATH'] on linux) and path to the resources (QgsApplication.setPrefixPath) 6. everything is ready :) What do you think about that? Such script could be included in QGIS sources so any project could copy it and use for bootstrapping. Bye Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] using rubberband as temp geometry
On Jan 19, 2008 12:53 AM, Richard Duivenvoorde [EMAIL PROTECTED] wrote: Hi List, using the rubberband example I'm trying to do a plugin in which I can add some 'blocks/geometries-of-interest' and add some labels to it (annotation?). My map is now showing a rubberband/geometry, and some label, but when I export it to an image, the label is there, but the geometry vanishes? Right, rubberband is a map canvas item so it's not a part of the map. When exporting map as an image I think it's correct not to show map canvas items as they are usually used for some map tools. Is that the implementation of the rubberband? Or am I responsible myself for painting those 'temporary' features? Or am I supposed to make some 'memory-vector'-layer, and add the rubberband as a geometry to that using 'setToGeometry'? (Tried that, but got an attribute-error (using 9.1 on debian)). Or something else? No canvas items are exported to the images. If you need this behaviour you should be able to use function of ancestor of map canvas - QGraphicsView::render() - that can render the complete map canvas contents to output and not just the map. Martin ___ 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
Re: [Qgis-user] Two different QGIS installations on one linux box
On Jan 14, 2008 10:07 AM, Düster Horst [EMAIL PROTECTED] wrote: I want to install two different QGIS Versions on one linux box. 1. Stable 0.9.1 in production state and 2. unstable 0.9.2 for developing. With ccmake I configure different CMAKE_INSTALL_PREFIX for each installation. After make install 1. the Python bindings for 2. are not available and vice versa. What do I have to do to run two versions with Python bindings? Hi, have you installed both versions from the same source directory? I´m wondering whether there´s not some weird problem with rpath. Please try running ldd on python core.so library in both versions to see where does it link to... Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] How to identify a raster on the map?
On Jan 14, 2008 9:36 PM, Aaron Racicot [EMAIL PROTECTED] wrote: http://blog.qgis.org/?q=node/104 Aaron, a note about the implementation: in fact you don't need to implement RasterInfoTool - there's QgsMapToolEmitPoint in gui iibrary which does the same thing :-) Moreover, when reimplementing activate/deactivate functions you should also call parent QgsMapTool::(de)activate function to keep everyone happy. But well, I know... documentation is lacking :-/ Greetings Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Problem compiling PyQt4
On Jan 12, 2008 2:36 PM, Micha Silver [EMAIL PROTECTED] wrote: 1- What do I lose by not having Python bindings? Python support in QGIS is optional, that's why it compiles and works also without it. The most interesting part of the python support for ordinary users is ability to use plugins written in Python. There are already some plugins available (see http://spatialserver.net:3001/ ) and more can be expected to come. Power users could use Python support in QGIS to do some scripts for handling their geographic data or even build graphical applications based on QGIS libraries. 2- Any ideas how to overcome that error with PyQt4 No idea here, you could get some advice on PyQt mailing list... Regards, Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] [Qgis-developer] Python build problem on OSX
On Dec 19, 2007 6:48 AM, Tom Elwertowski [EMAIL PROTECTED] wrote: William Kyngesburye wrote: I found a build problem (unnoticed back in 0.9.0) with the Python support on OSX - it will NOT build universal, or with an SDK (which means I can't build *on* Leopard *for* Tiger, due to some library version incompatibilities). [...] The problem is that the QGIS Python modules are completely managed by a Python script. If the generated files were directly compiled by CMake, the problem would disappear. This would also solve the problem of all C++ files being regenerated and recompiled whenever any file, not just those which have a modified Python binding, is modified. It would make more sense to me if each sipxxx.cpp depended upon xxx.sip and Python was invoked only to generate the .cpp file leaving CMake to take care of compiling and linking C++ files. I know that the way how the compilation of PyQGIS works now isn't optimal at all, however I wasn't able to figure out any better solution. Python modules sipconfig and pyqtconfig do all the hard work detecting correct parameters for compilation for all supported platforms/compilers. Looking at sipconfig I see it supports universal builds - try this: in configure.py.in add argument universal='/Developer/SDKs/MacOSX10.4u.sdk' to sipconfig.ModuleMakefile() constructor - when creating variables makefile_core and makefile_gui It should do exactly the same as Tom has written manually to makefiles... Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] red-lining / annotations plugin ?
On Dec 7, 2007 3:01 PM, Tim Sutton [EMAIL PROTECTED] wrote: In fact you can use QGIS project files to save plugin-specific data for a plugin - see QgsProject class. In case you'd like to be able to use one set of annotation for different project it would be wiser to save them separately - in a file or a database. Using files for saving annotations (e.g. with python serialization) should be easier to use for user as they won't need to set up a database/table for them etc. And actually user would expect that annotation plugin should work also without postgres database. There is also the option of using the SQLite3 qgis.db which gets installed into every users ~/.qgis/ directory. Hi, that's true, however access to this database is not encapsulated by QGIS API so far, thus it would be a bit rough to use... Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] red-lining / annotations plugin ?
Hi Richard, On Dec 3, 2007 12:10 PM, Richard Duivenvoorde [EMAIL PROTECTED] wrote: QUESTIONS: - has somebody been busy with this kind of stuff? I don't know about anyone doing such support. But in fact you could use already existing QGIS facilities although the usage is not that straightforward as it could be with an annotation plugin: you can create new layers in QGIS and capture some points, polylines or polygons. You can also enable labeling so that some captured features can be drawn with text. - if not: should this be doable using the python plugin interface? Yes, surely. Map canvas API is really well-suited for this. - if so: I could't find python code examples in which there was actually some interaction between the mapcanvas and the plugin (aka: you draw a polygon on the map, and show some of it's properties in a plugin window or so). Can somebody give me a hand with that? Creating new map canvas items is not documented thoroughly but isn't hard. For start you can take a look at my simple QGIS-based program Quantum Navigator: http://mapserver.sk/~wonder/qnavigator/ There's also a screenshot of it - both flags on the start and end of the route are custom canvas items and they're done with just few lines of code. If you need one I'll try to create a small tutorial for creating custom canvas items and putting them to map canvas (and removing them). Regards Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] gsl-bin, swig - redundant build requirements?
On 11/6/07, Tim Sutton [EMAIL PROTECTED] wrote: Hi Martin Thanks I removed libtool from linux deps. By more libraries for gdal you mean libhdf4g-run and libhdf? Yes, those ones, also libjasper or libtiff... Btw. SWIG is not really needed - it would be needed only in case you'd like to regenerate msexport_wrap.cxx Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Grass lib
On 10/30/07, Cemal Koplay [EMAIL PROTECTED] wrote: Hi everyone, I want to ask a questions about compiling with Visual Studio. I'am trying compile qgis0.9.0 with Visual Studio 2005 with grass plugin but i think i must have grass library that are compiled with visual studio. Is it right and if it is right where can i find grass binaries (lib files) that are compiled VS? DO I have to compile grass for this purpose? AFAIK it's not possible to compile GRASS with VS - people compile it with MinGW. But C libraries should be binary compatible between compilers, so you shouldn't have a problem when compiling QGIS with MSVC using GRASS libs from MinGW. Someone correct me if I'm wrong. Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Grass lib
On 10/30/07, Cemal Koplay [EMAIL PROTECTED] wrote: Yes I just realese that. Know what i am trying to do is recompiling grass for getting def files for the grass libary dlls to use with LIB tool that converts def to lib files for using with MSVC. Is it possible to do so? My plan is after getting lib files, i will compile the grass plugin with MSVC. :) I think I can do like that. But I have problems with compiling grass with MinGW. Is there a simple way or a good document for compiling grass with MinGW? I guess you need to use 'dlltool'. See: http://www.mingw.org/MinGWiki/index.php/CreateImportLibraries Some notes about compiling GRASS on windows can be found on our wiki: http://wiki.qgis.org/qgiswiki/BuildingFromSource Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] python 'html image map' plugin
Hi Richard, I'm trying out Qgis 9 and it's python bindings on Debian. It's really fun (and doable) to write a python plugin. 'MyFirstPlugin' is a plugin which generates an html-page containing an image map of given 'map view'. You can generate area-tags for all polygons of the active layer, OR for just a selection. You can either generate href, and/or onclick and/or onmouseover attributes. nice one! I'm glad that finally developing plugins for QGIS is fun :-) Question: - please let me know if it's useful enough to add to the wiki (I will add it later then) I guess it is :-) - is there some 'plugin repository' available nowadays? I've found an old dead link somewhere: http://qgis.linuxfund.org/. But with the upcoming possibility to write plugins in python I think it would be nice to have some kind of searchable repository somewhere. We should make one page on wiki containing links to some pieces of QGIS-based software - both plugins and 3rd party apps. Any ideas how to call it? SoftwareRepository? Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Trouble with SIP in current preview
On 8/30/07, Luca Casagrande [EMAIL PROTECTED] wrote: Hi Martin and thank for your answer. With the current svn, qgis builds fine but, once started, it can't found python bindings. Hi again, to see where's the problem, fire up console and set PYTHONPATH variable: export PYTHONPATH=(qgis_install_path)/share/qgis/python Then start python and type: from qgis.core import * from qgis.gui import * And check whether it will spit out any errors during the import. Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Trouble with SIP in current preview
That looks like a mismatch of libraries from 0.8 and 0.9 ... Have a look to which qgis_core and qgis_gui libraries do the core.so and gui.so python modules link to: ldd /home/geko/qgis/share/qgis/python/qgis/core.so Martin On 8/30/07, Luca Casagrande [EMAIL PROTECTED] wrote: Hi Martin, this is the output: [EMAIL PROTECTED] ~ $ python Python 2.4.4 (#1, Aug 13 2007, 15:41:20) [GCC 4.1.1 (Gentoo 4.1.1)] on linux2 Type help, copyright, credits or license for more information. from qgis.core import * Traceback (most recent call last): File stdin, line 1, in ? ImportError: /home/geko/qgis/share/qgis/python/qgis/core.so: undefined symbol: _ZNK9QgsSymbol13customTextureEv from qgis.gui import * Traceback (most recent call last): File stdin, line 1, in ? ImportError: /home/geko/qgis/share/qgis/python/qgis/gui.so: undefined symbol: _ZN19QgsMapToolEmitPoint11qt_metacastEPKc ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] qgis python plugins / bindings on windows
On 8/20/07, Richard Duivenvoorde [EMAIL PROTECTED] wrote: My questions (hopefully this will be a quickstart the for all c-noobs like me): - will you need a c-build environment (including make) to make python plugins? Now or after the 'real' 0.9 release? Hi Richard! When using binaries (i.e. you don't build qgis by yourself), you can avoid installation of the build environment. On PyQt download page, there's a binary package for windows with all stuff that you might need: http://www.riverbankcomputing.co.uk/pyqt/download.php So, in your case you would need to install only Python 2.5 and PyQt binary package. QGIS python bindings then should load correctly. I'll add a note about this on wiki... - or is (will be) there another way to start hacking python plugins (eg. some huge qgis install including sip, python and pyqt or so??). I hope this question is answered with the answer above. - if c-make etc is needed, what is the easiest way to start on windows: mingw, eclipse, visual studio, cygwin? MinGW is the best option here (and also only one officially supported) - cygwin or msvc might or might not work for you. Btw. Eclipse doesn't include a compiler by itself, but it can handle mingw and cygwin. - how 'portable' will a python plugin be? If I develop a plugin on my debian box, can this plugin be used on 'vanilla qgis install' on windows also then (given the user installed python)? If you won't use any OS-dependent python modules, it will be portable - everything will just work :) I fear that I underestemated the python story, but will try anyway. There are so much nice free arcview3 scripts available to 'port' to qgis, and python seems a ideal language for this. I hope that getting python bindings to work won't be a headache. If you encounter any problems, don't hesitate to contact us. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 0.9 cannot find libqgis_core.so
On 7/31/07, Tim Sutton [EMAIL PROTECTED] wrote: Hi Magnus Em 27/07/2007, às 21:00, Magnus Homann escreveu: If that's the way you like it, sure. The discussion we had was not about _how_ but it circled around _if_. Ah I confess to not going back to the archives... I guess we could always put in a USE_RPATH flag into cmake so people can pick their preference and then just wrap the rpath stuff in a IF (USE_RPATH) blah ENDIF (USE_RPATH) How does that sound? Going again through discussions on several mailing lists (debian, cmake, kde), I still don't know how to do this right. Some say that using rpath is great because it forces to use harcoded runtime paths, other say it's evil because of that. Bad thing is that rpath overrides LD_LIBRARY_PATH setting, which might be confusing. Also it adds some pain to distributors (IMHO). But it makes life easier for users which compile the software by themselves and don't use packaged versions. So, what to do? I would say that the best choice is to forget rpath completely and let users set LD_LIBRARY_PATH manually. But if you insist to use rpath, then the best way is the one you propose: make it configureable and turn it on by default. Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Build QGIS from source
When I then run ~/apps/bin/qgis I first get this: ./qgis: symbol lookup error: ./qgis: undefined symbol: _ZN10QgsMapTool9setActionEP7QAction This is surely due the fact that your system uses wrong libraries - it chooses those in e.g. /usr/local/lib but it has to choose the ones which are in ~/apps/libs How to do this - set LD_LIBRARY_PATH variable - it will add the specified dirs to the library search: export LD_LIBRARY_PATH=~/apps/lib This should also go to the wiki... Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Re: [Qgis-developer] Using Request for changes (RFC) in QGIS project
On 6/8/07, Marco Hugentobler [EMAIL PROTECTED] wrote: You mean that people directly insert their votes into the wiki page? I made a RFC wiki page (http://wiki.qgis.org/qgiswiki/RequestForComment) and a template that can be copied. Individual votings would then be separated with === vote === at the bottom of the RFC. Links to the RFC instances would be inserted below 'Existing RFCs' on the RFC wiki page. @all can you agree with this? Please have a look at the wiki page and write your opinion. Are five working days enough as a voting period or should it be longer? I like the template, five working days seem OK to me. Author of the RFC should also add a FAQ section and fill it with questions and answers based on the discussion on the mailing list. In case that RFC is changed based on the discussions, the voting should get another five days. Also what about the cases when later the dev finds out that he needs to do things differently? Change the RFC and start voting again? Or create a new RFC ...? BTW. That new template on wiki looks cool :-) Bye Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] (no subject)
On 6/6/07, Pleyer, Walter [EMAIL PROTECTED] wrote: [ 16%] Building CXX object src/core/CMakeFiles/qgis_core.dir/qgsgeometry.obj C:\dev\cpp\qgis\src\core\qgsgeometry.cpp: In member function `int QgsGeometry::addIsland(const QListQgsPoint)': C:\dev\cpp\qgis\src\core\qgsgeometry.cpp:2511: warning: comparison between signed and unsigned integer expressions mingw32-make[2]: *** [src/core/CMakeFiles/qgis_core.dir/qgsgeometry.obj] Error 1 mingw32-make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2 mingw32-make: *** [all] Error 2 Any hints? I would suggest you to run CMakeSetup and set PEDANTIC variable to off until we check in a fix for this warning. After this change 'make' should run well. Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] (no subject)
On 5/29/07, Pleyer, Walter [EMAIL PROTECTED] wrote: Hi folks! I'm trying to compile Qgis on Windows with the ultimate goal of a Qgis Version with ecw-support for windows. Unfortunately cmake is making troubles (but no binary): C:\dev\cpp\qgiscmake . -- Check for working C compiler: C:/mingw/bin/gcc.exe -- Check for working C compiler: C:/mingw/bin/gcc.exe -- broken CMake Error: The C compiler C:/mingw/bin/gcc.exe is not able to compile a simple test program. Hi Walter, is there any reason why you don't use mingw from msys environment (c:\msys\mingw) ? Also, have you run qtvars.bat before cmake to set the right paths? Moreover I advice you to do the build in a separate directory, it's easier to do a complete clean etc. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] About compile QGIS to release version
On 5/13/07, li somic [EMAIL PROTECTED] wrote: Hi, I'm following the instructions (https://svn.qgis.org/repos/qgis/trunk/qgis/README_windows.txt) to build QGIS. My environment:windows 2003 compiler:MinGw32 Python:2.5 Cmake:2.4 qgis code form svn:https://svn.qgis.org/repos/qgis/trunk/qgis I am going to compile qgis to release version,not debug version,What is I to do? Hi, the steps for building release and debug version are the same, except that in CMakeSetup you set variable CMAKE_BUILD_TYPE to Debug or Release Regards, Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Geocoder plugin
On 4/23/07, Matthew Perry [EMAIL PROTECTED] wrote: Hey everyone, It's been a rainy weekend here, a good time to learn the python qgis bindings. I decided to implement a geocoder plugin which would use web services to do all the tough work and the delimited text provider to load the results into qgis. What started mostly as a learning experiment turned into something that might actually be useful ;-) I've took a look at it and it's quite nice :-) It's just a bit pity that their geocoding doesn't work everywhere well... it couldn't even find the capital city of my country (Slovakia). Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Problem Importing Shapefile to PostgreSQL
Hi, please report your problem to our bug tracking system and attach (or link) also the shapefile you're trying to import. https://svn.qgis.org/trac Btw. yes, error reporting in the import tool is poor, that might be another ticket :) Martin On 4/14/07, Jack Morris [EMAIL PROTECTED] wrote: I am having problems importing shape files from QGIS to PostgreSQL using the Import Tool. I am using Ubuntu Edgy, PostgreSQL 8.1.4. I have successfully, I think, installed PostGIS and can see, using pgAdmin III, that I have added to my database: 14 Casts, and under Schemaspublic: 9 Aggregates, 328 Functions, 17 Operators, 2 Tables (geometry_columns and spatial_ref_sys) and 7 Types. I can successfully connect to my database from the Import Tool as postgres, but when I try to import a shape file I get: Problem inserting features from file: (path to shape file) No other explanation!!! Jack ___ Qgis-user mailing list [EMAIL PROTECTED] http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user ___ Qgis-user mailing list [EMAIL PROTECTED] http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Writing plugins::export selected object to OGR
On 2/6/07, Oleg Gusev [EMAIL PROTECTED] wrote: Am Dienstag, 6. Februar 2007 13:27 schrieben Sie: sorry, but I did not find the export to shapefile function in qgis. Could you give me a hint? In ./src/core/qgsvectorfilewriter.cpp QgsVectorFileWriter::QgsVectorFileWriter ... mOutputFormat = ESRI Shapefile; //hard coded for now! ... QString driverName = ESRI Shapefile; ... The mentioned class in fact is not finished and I'm not sure it works at all. So far QGIS lacks the functionality of a generic OGR (or shapefile) output, so it might be better not to create a plugin for this - improving vector file writer class to be usable would be better. Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
[Qgis-user] QGIS and platforms
Hi all, I'd like to ask you to try to build and run QGIS from SVN trunk in case you're running a something other than Windows, Mac or Linux (these platforms are already known to work). We're considering the usage of CMake build system and we would like to know whether everything will work also on platforms like *BSD, Solaris and other UNIX systems. Instructions on building can be found here: http://wiki.qgis.org/qgiswiki/Building_with_CMake Thanks for any help, Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] qgis/qt font problem
Hi, here's a suggested solution for the problem I guess: http://svn.qgis.org/trac/ticket/503 Martin On 1/27/07, Martin Landa [EMAIL PROTECTED] wrote: Hi all, I have problem with fonts in QGIS. I have changed Qt configuration (qtconfig) many times without any success. Still I can see very ugly fonts in my QGIS [1]. On Debian GNU/Linux unstable, Qt 4.2.1. Thanks, Martin [1] http://gama.fsv.cvut.cz/~landa/.../qgis-font-problem.png -- Martin Landa [EMAIL PROTECTED] * http://gama.fsv.cvut.cz/~landa * ___ 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] Can't build qgis from svn anymore --- undefined preprocessor symbol?
Hi Tom, building with autogen.sh or configure script is broken at the moment - currently we're trying CMake as a replacement of current automake autoconf build system. Please search qgis-developer archives from this month on how to build qgis with CMake. Don't hesitate to contact us with any problems with it - preferably on qgis-developer list as it's still a bit in development. Regards, Martin On 1/26/07, Tom Russo [EMAIL PROTECTED] wrote: The last time I built qgis was on 15 Dec from svn. Last night and this morning I tried to update by doing an svn update, and I'm getting compile failures. My current revision is revision 6458. My system is Ubuntu 6.10. I clean out the directory with make distclean, configure with: ./autogen.sh --with-grass=/usr/local/grass-6.3.cvs --with-qtdir=/usr and make with just make. The result is that the first file in the compile fails: g++ -DHAVE_CONFIG_H -I. -I. -I../.. -DPREFIX=\/usr\ -DPLUGINPATH=\/usr/lib/qgis\ -DPKGDATAPATH=\/usr/share/qgis\ -g -O2 -DQT3_SUPPORT -I/usr/mkspecs/default -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtXml -I/usr/include/qt4 -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtTest -I/usr/include/qt4/QtDesigner -D_REENTRANT -DQT_THREAD_SUPPORT -I/usr/include/postgresql -DNO_DEBUG -I/usr/include -I/usr/local/include -Iraster -Irenderer -Isymbology -g -O2 -MT libqgis_core_la-qgis.lo -MD -MP -MF .deps/libqgis_core_la-qgis.Tpo -c qgis.cpp -fPIC -DPIC -o .libs/libqgis_core_la-qgis.o qgis.h:35: error: invalid function declaration qgis.cpp:10: error: 'QGis' has not been declared qgis.cpp:13: error: 'QGis' has not been declared qgis.cpp:16: error: 'QGis' has not been declared qgis.cpp:19: error: 'QGis' has not been declared qgis.cpp:21: error: 'QGis' has not been declared qgis.cpp:29: error: 'QGis' has not been declared qgis.cpp:40: error: 'QGis' has not been declared Line 35 of qgis.h is: class CORE_EXPORT QGis the remaining lines of qgis.cpp are lines that attempt to declare things like QGis::qgisVersion My guess is that CORE_EXPORT is not being defined correctly for my system and is confusing the compiler. But I don't see where it's set or how it's wrong. Help? -- Tom RussoKM5VY SAR502 DM64ux http://www.swcp.com/~russo/ Tijeras, NM QRPL#1592 K2#398 SOC#236 http://kevan.org/brain.cgi?DDTNM And, isn't sanity really just a one-trick pony anyway? I mean all you get is one trick, rational thinking, but when you're good and crazy, oooh, oooh, oooh, the sky is the limit! --- The Tick ___ 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
[Qgis-user] CMake build notes
Hi all, I've put together some notes on building QGIS with CMake on wiki: http://wiki.qgis.org/qgiswiki/Building_with_CMake It's still a work in progress but it should serve as a source of information on building QGIS SVN on any platform. Any comments and suggestions are welcome. Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] compilation of qgis 0.8 on fc6
On 1/10/07, Jean Cayron [EMAIL PROTECTED] wrote: I've got the same problem on openSuse 10.2 64 bits. When I use --with-qt-pkg-config it does as for Honza. When I use --with-qtdir=/usr it ends lke that : checking QTDIR... /usr checking Qt version in /usr/include/Qt... 421 (4) checking for moc... /usr/bin/moc checking for uic... /usr/bin/uic checking for rcc... /usr/bin/rcc configure: error: *** Couldn't find any Qt libraries in /usr/lib It's logical since my libraries are under /usr/lib64 ... But there is no obvious option to solve that. Any idea ? Usually that there's a symlink from /usr/lib64 to /usr/lib ... don't you have this symlink? Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
[Qgis-user] problems with windows build
Hi, I've tried to summarize all known problems of windows test build in this ticket: https://svn.qgis.org/trac/ticket/286 This ticket is also the best place for reporting problems that related to the build and installation of windows version. Bye, Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] trouble compiling latest SVN
On 11/2/06, Stefano Costa [EMAIL PROTECTED] wrote: qgscontexthelp.moc.cpp:15:34: error: private/qucomextra_p.h: No such file or directory qgscontexthelp.moc.cpp:17:2: error: #error This file was generated using the moc from 3.3.6. It qgscontexthelp.moc.cpp:18:2: error: #error cannot be used with the include files from this version of Qt. qgscontexthelp.moc.cpp:19:2: error: #error (The moc has changed too much.) Hi, something is wrong with your paths or Qt installation - because 'moc' utility of Qt3 has been used instead of Qt4 one. Maybe using option --with-qtdir=... in configure script will help. Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user