[Qgis-user] How to reproject maps of world grasslands
Hello folks! I would like to plot a simple map of the WWF World Grassland Types (the shape file is available at https://www.worldwildlife.org/publications/world-grassland-types It is in an unusual projection. The .prj file is: PROJCS["World_Goode_Homolosine_Land",GEOGCS["GCS_WGS_1984",DATUM ["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM "Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION ["Goode_Homolosine"],PARAMETER["False_Easting",0.0],PARAMETER ["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER ["Option",1.0],UNIT["Meter",1.0]] The map does not include the outline countries of the world and therefore I would like to add these (perhaps the NaturalEarth 110 million scale country shape file, which is in WGS84). However, I cannot figure out how to align the grassland layer and the 110 million NaturalEarth layer. As I understand it, I should use Save As to reproject the grassland shape file with a new CRS (perhaps Mercator). With Enable on the fly CRS transformation enabled I should then be able to put the two shape files together - but I am darned if I can obtain anything sensible: I cannot get the two layers to align in any way. With grateful thanks for any help, Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] How to reproject maps of world grasslands
Many thanks Raymond: that is helpful. Now at least I know what the projection is! As QGIS has so many projections it never occurred to me that there may be one that it didn't include. I will now see if there is some other way - outside QGIS perhaps? - to convert this projection into something more friendly (so to speak). Martin On 19/03/17 21:30, Raymond Nijssen wrote: Hi Martin, Sorry, I cannot really help you. Your data seems to be in the (quite odd for distributing data) projection: https://en.wikipedia.org/wiki/Goode_homolosine_projection And it is not recognized by qgis. Proj4 seems to know it though: http://proj4.org/projections/igh.html And I found this: http://gis.stackexchange.com/questions/17263/is-it-possible-to-use-the-goode-homolosine-projection-in-qgis Hope it helps (a bit), Raymond On 19-03-17 20:49, Martin wrote: Hello folks! I would like to plot a simple map of the WWF World Grassland Types (the shape file is available at https://www.worldwildlife.org/publications/world-grassland-types It is in an unusual projection. The .prj file is: PROJCS["World_Goode_Homolosine_Land",GEOGCS["GCS_WGS_1984",DATUM ["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM "Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION ["Goode_Homolosine"],PARAMETER["False_Easting",0.0],PARAMETER ["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER ["Option",1.0],UNIT["Meter",1.0]] The map does not include the outline countries of the world and therefore I would like to add these (perhaps the NaturalEarth 110 million scale country shape file, which is in WGS84). However, I cannot figure out how to align the grassland layer and the 110 million NaturalEarth layer. As I understand it, I should use Save As to reproject the grassland shape file with a new CRS (perhaps Mercator). With Enable on the fly CRS transformation enabled I should then be able to put the two shape files together - but I am darned if I can obtain anything sensible: I cannot get the two layers to align in any way. With grateful thanks for any help, Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] How to reproject maps of world grasslands
Thank you very much. I tried this suggestion and it works perfectly! Forgive my ignorance, but how did you know that '+proj=igh' would produce the correct result? I understand that igh means Interrupted Goode Homolosine, but where did you find this information (this is for my education)? I am going to write to WWF and suggest that they make the grasslands shape file available in WGS84 (i.e. EPSG 4326), as I would like to direct others to it without the need for providing an explanation of how to transform the data. I discovered that ArcGIS understands the Interrupted Goode Homolosine CRS. A friend with ArcGIS has now converted it to EPSG 4326 for me and this also works fine and produces the same result as your excellent suggestion. Ciao, Martin On 20/03/17 07:54, Paulo van Breugel wrote: Using the definition on the proj4 page, you can define a custom CRS (settings --> custom crs). Just fill in under parameters '+proj=igh'. I just tried and it gives a good match Note that this grassland layer is based on the terrestrial ecoregional map of WWF [1]. If you over overlay that on your grassland layer, using for the latter the Interrupted Goode Homolosine CRS, you see they will overlap perfectly. You could in fact easily recreate the map using the ecoregional map. Cheers, Paulo [1]https://www.worldwildlife.org/publications/terrestrial-ecoregions-of-the-world On 20-03-17 07:46, Martin wrote: Many thanks Raymond: that is helpful. Now at least I know what the projection is! As QGIS has so many projections it never occurred to me that there may be one that it didn't include. I will now see if there is some other way - outside QGIS perhaps? - to convert this projection into something more friendly (so to speak). Martin On 19/03/17 21:30, Raymond Nijssen wrote: Hi Martin, Sorry, I cannot really help you. Your data seems to be in the (quite odd for distributing data) projection: https://en.wikipedia.org/wiki/Goode_homolosine_projection And it is not recognized by qgis. Proj4 seems to know it though: http://proj4.org/projections/igh.html And I found this: http://gis.stackexchange.com/questions/17263/is-it-possible-to-use-the-goode-homolosine-projection-in-qgis Hope it helps (a bit), Raymond On 19-03-17 20:49, Martin wrote: Hello folks! I would like to plot a simple map of the WWF World Grassland Types (the shape file is available at https://www.worldwildlife.org/publications/world-grassland-types It is in an unusual projection. The .prj file is: PROJCS["World_Goode_Homolosine_Land",GEOGCS["GCS_WGS_1984",DATUM ["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM "Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION ["Goode_Homolosine"],PARAMETER["False_Easting",0.0],PARAMETER ["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER ["Option",1.0],UNIT["Meter",1.0]] The map does not include the outline countries of the world and therefore I would like to add these (perhaps the NaturalEarth 110 million scale country shape file, which is in WGS84). However, I cannot figure out how to align the grassland layer and the 110 million NaturalEarth layer. As I understand it, I should use Save As to reproject the grassland shape file with a new CRS (perhaps Mercator). With Enable on the fly CRS transformation enabled I should then be able to put the two shape files together - but I am darned if I can obtain anything sensible: I cannot get the two layers to align in any way. With grateful thanks for any help, Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Station lines determined by point layer
Hi, I have a layer that contains a number of lines and another layer that contains points at various locations along those lines. I want to draw station lines across the line next to the point and I also want to add the angle of the station line to the point in the point layer so that I can rotate an icon. I have considered using the station lines plugin as the basis for a new plugin but I wondered if someone had already done this or got part of the way there. All suggestions welcome. Thanks for any help Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Auxillary storage fields and field calculator
Hi, I have a postgis dataset that currently has sets of label x , y and rotations for different projects. Moving to QGIS 3 I would like to remove these fields and use auxillary storage instead. I have created the auxillary storage fields and I would like to use the field calculator to copy the data from the label_x fields in the potgis dataset into the new fields. When I try to "Update existing field" the auxillary storage fields are not listed. I can use them as inputs to an expression but not as outputs. I couldn't find this discussed so not sure if this is a known limitation. Thanks for the help. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QgsVectorDataProvider.deleteAttributes(), PyConsole problem
Hi Chris On Wed, Sep 29, 2010 at 5:32 PM, Chris Carleton w_chris_carle...@hotmail.com wrote: import qgis.core import qgis.gui import PyQt4.QtCore import PyQt4.QtGui vlayer = qgis.utils.iface.activeLayer() provider = vlayer.dataProvider() feat = QgsFeature() newField = QgsField(azimuth,QVariant.Double) provider.addAttributes([newField]) newFieldIndex = provider.fieldNameIndex(newField.name()) vlayer.commitChanges() When I try to use the following code to delete the column, the function returns 'false'; provider.deleteAttributes([newFieldIndex]) Not all providers support all editing operations. For example, OGR library does not support deleting attributes. To check what operations are working, use provider's capabilities() method: print delete supported?, provider.capabilities() QgsVectorDataProvider.DeleteAttributes One more note: in the above code, you use layer's commitChanges() method. This is not necessary (nor correct) here, here's the deal: When calling provider's editing methods, the changes are immediately written to the data store (file / database etc). On the other hand, editing methods of QgsVectorLayer use a temporary buffer and the workflow is as follows: 1. call vlayer.startEditing() ... otherwise the layer's editing functions will fail 2. call layer's editing methods ... all changes are kept in the editing buffer 3. call vlayer.commitChanges() ... to push the pending changes to the provider Alternatively instead of committing changes, you could do a rollback: vlayer.rollback() to discard any changes. Both commitChanges() and rollback() quit the editing mode, so you would have to call startEditing() again. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] 'snapSegmentWithContext' with Quantum Navigator
Hi Joe the Quantum Navigator project has been dead for several years, so such errors from old API calls can jump at you from any corner. I'm quite busy nowadays, so I guess you're on your own :-( btw. for your particular error: try to have a look at the QgsVectorLayer class. There are other snap*() functions which I believe have replaced that snapSegmentWithContext method. Regards Martin On Sun, Oct 17, 2010 at 5:54 PM, Joe Larson joela...@gmail.com wrote: Hello All, I'm trying to get Quantum Navigator http://www.mapserver.sk/~wonder/qnavigator/ going on Maverick Meerkat, built against QGIS trunk. jef on IRC helped me with the API switch past QGIS 1.0, which got me past the initial 'make' compile. I got through ./dgbuild and can run qnavigator.py, but when I am in the 'Routing' tab and pass a Start event from(to) the map. seems 'snapSegmentWithContext' is stumping me: Traceback (most recent call last): File /home/joe/dev/qnavigator/python/gui/tools.py, line 21, in canvasReleaseEvent self.callback(self.pos) File /home/joe/dev/qnavigator/python/gui/main.py, line 257, in gotStart pnt = self.routing.setStart(pos) File /home/joe/dev/qnavigator/python/routing/routing.py, line 159, in setStart self.start = self.layer.findNearestPoint(point) File /home/joe/dev/qnavigator/python/routing/routing.py, line 84, in findNearestPoint (result, point, vertexIndex, fid, geom) = self.snapSegmentWithContext(point, RoutingLayer.tolerance) AttributeError: 'RoutingLayer' object has no attribute 'snapSegmentWithContext' does anyone have any advice? i tried adjusting the tolerance, researching besides that...thank you, ~joe ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: AW: Re: Fwd: [Qgis-user] QGIS Near
On Thu, Oct 28, 2010 at 7:48 AM, Ziegler Stefan stefan.zieg...@bd.so.ch wrote: Hi Giuseppe thanks for looking into this. Do you think it's worth filling out a bug report since the nearestNeighbor method does not the keep the promise or is this the normal behaviour of a spatial index based method? Spatial index uses only the bounding boxes of geometries for two reasons: most importantly the intersection test (used when traversing the data structure) is much faster when compared to testing intersection of real geometry. Second, this would require spatial index to store all geometries - this memory overhead can be significant for bigger layers. So as David already suggested, to ensure you are really working with the nearest geometry, you should check the real distance. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] error postgis manager
On Tue, Nov 23, 2010 at 3:29 PM, Dario dari...@yahoo.com.br wrote: [...] File C:\Documents and Settings\Dgalvao/.qgis/python/plugins\postgis_manager\DatabaseModel.py, line 77, in constructTreeFromDb list_tables = db.list_geotables() File C:\Documents and Settings\Dgalvao/.qgis/python/plugins\postgis_manager\postgis_utils.py, line 256, in list_geotables items[i] = geo_item IndexError: list assignment index out of range Hi, does this happen every time you try to connect to your database? Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] qgis-mapserver und Umlaute
Hallo allerseits Folgendes Problem: Ich habe qgis-mapserver erfolgreich installiert und bin nach folgender Anleitung vorgegangen: http://karlinapp.ethz.ch/qgis_wms/documentation/index.html Ich habe also das qgs direkt im /cgi-bin gespeichert. Dabei hat auch alles wunderbar funktioniert. Nur werden bei der Layerbeschriftung keine Umlaute (ä ,ö,ü) angezeigt. Ein Beispiel findet sich z.B. hier (Ganz unten sollte es Die Südflur heissen. Angezeigt wird: Die Sdflur): http://asmaron.homelinux.net/cgi- bin/qgis_mapserv.fcgi?LAYERS=HerrschaftsgebieteREASPECT=trueTRANSPARENT=trueFORMAT=image%2FpngSERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageSRS=EPSG%3A32632BBOX=529.8216318785583,-4.547473508864641e-13,3459.643263757116,1529.8216318785574WIDTH=556HEIGHT=556 In QGis werden die Umlaute allerdings korrekt wiedergegeben... QGis-Version: 1.6.0 QGis mapserver: 1.7.0+snv14754~lenny1 Ist das ein Fehler im qgis-mapserver? oder nur irgendwelche falschen Einstellungen? Bzw. wie könnte ich das beheben? Vielen Dank und viele Grüsse Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Re: qgis-mapserver and Umlaute
Hi Andreas, Marco and others Thanks a lot for your advice. I have found the solution. The problem was, that the shape-files had a UTF-8 encoding, but in the *.qgs the encoding was set to System. Obviously, the System-encoding was not UTF-8 (surprise). So I had to change provider encoding=System ogr/provider to provider encoding=UTF-8 ogr/provider. Now it works fine. Thanks a lot and best regards, Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QgsVectorLayerDataProvider problem?
On Fri, Jan 14, 2011 at 8:39 PM, Gary Smith gary.smith@gmail.com wrote: Hello, I am not sure whether this is the right forum but extensive Google searches have not helped. I am writing a plugin to convert the segments of a polyline to a layer of individual 2 vertex line features. This is the code I used to do the job feat = QgsFeature() p = 0 while p cl.featureCount(): cl.featureAtId(p, feat, True, True) geom0 = QgsGeometry(feat.geometry()) vl = QgsVectorLayer(LineString, Mylines, memory) provider = vl.dataProvider() provider.addAttributes( [ QgsField( id , QVariant.String), QgsField( agl , QVariant.String) ]) pnt10 = QgsPoint( geom0.vertexAt(0) ) segfeat = QgsFeature() itr = 1 while ( QgsPoint( geom0.vertexAt(itr) ) QgsPoint(0,0) ): pnt10 = QgsPoint( geom0.vertexAt(itr -1) ) pnt11 = QgsPoint( geom0.vertexAt(itr) ) newGeom = QgsGeometry.fromPolyline( [ pnt10, pnt11 ] ) segfeat.setGeometry( newGeom ) segfeat.setAttributeMap( { 0 : QVariant( str(itr) ), 1 : QVariant( str(agl) ) } ) provider.addFeatures( [segfeat] ) itr += 1 p += 1 vl.commitChanges() QgsMapLayerRegistry.instance().addMapLayer(vl) Hi Gary I'm not sure what exactly you are trying to do. From the code snippet it looks that for each feature of the original layer you create a new layer! That's probably not what you want, is it? I have few more suggestions: - iterate over the input using select() and nextFeature() methods instead of featureAtId(). Generally IDs of features are not increasing from 0. The former approach guarantees you that you will not miss any features - to work with geometry, you can call geometry's asPolyline() method to get a list of points - more convenient than calling vertexAt() - no need to call vl.commitChanges() since you do changes directly to the provider Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Re: [Qgis-developer] hackfest Lisbon, Hotels
On Mon, Feb 21, 2011 at 1:57 PM, Giovanni Manghi giovanni.man...@gmail.com wrote: Hi all, Paolo and Giuseppe had already reserved their flights and hotel room. They will stay here http://www.ibishotel.com/gb/hotel-2117-ibis-lisboa-saldanha/index.shtml that is 30 minutes away from the venue by walk or 10/15 by metro. I suggest everyone that want to come to the hackfest to start thinking book early their flights and hotels as the hackfest days are near Easter holidays and many tourist are expected to visit Lisbon. You can find many good links at the usual page http://www.qgis.org/wiki/5._QGIS_Hackfest_in_Lisbon_2011 Hi Giovanni it would be good if you could pick e.g. one hostel and one hotel for us which are preferred, so that the number of locations where people stay is minimized. It is simpler and more pleasant when you can meet with others in lobby in the morning, have a breakfast and go to the venue in a group. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] qgis OSM plugin misses features on save.
On Sun, Feb 27, 2011 at 6:53 AM, Manoj Bist manoj.bi...@gmail.com wrote: Hi, I am using qgis version 1.6.0 on ubuntu-karmic. The OSM plugin is missing out quite a few osm features on Save. This is what I am doing. Load an OSM file. (Step 1) Add a way. (Step 2) Save to a new OSM file. (Step 3) The new OSM file that I saved in step 3 does not have all the features including the ones that were in the original OSM file loaded in step 1. I would really appreciate any insight into resolving this. I've spent quite a bit of time on this. Hi please create a ticket for this issue in our bug tracker and attach as much details as possible: http://trac.osgeo.org/qgis Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] qgis OSM plugin misses features on save.
On Mon, Feb 28, 2011 at 8:39 PM, Manoj Bist manoj.bi...@gmail.com wrote: Hi Martin, I will open a ticket. I can volunteer to fix this myself. I would really appreciate if someone could point me to OSM plugin code/any other document to get started. Hi you are welcome to fix the problem. You will need some Python and Qt knowledge and learn a bit of QGIS API. The recommended starting points are: PyQGIS developer cookbook: http://www.qgis.org/pyqgis-cookbook/ QGIS API documentation: http://doc.qgis.org/head/ And there are various other tutorials and blog posts floating on the web... I would suggest you to first check out qgis source code from SVN repository. The code of OSM plugin is in python/plugins/osm directory. This might be useful, too: http://www.qgis.org/wiki/Building_QGIS_from_Source Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Send us your tips!
On Wed, Mar 2, 2011 at 12:25 AM, Alister Hood alister.h...@synergine.com wrote: But I think symbol levels should probably be enabled by default, in which case this tip wouldn't be necessary :) Rendering with symbol levels is more costly, so -1 for me to enable it by default. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Send us your tips!
On Wed, Mar 2, 2011 at 9:56 AM, Tim Sutton li...@linfiniti.com wrote: Hi Martin On Wed, Mar 2, 2011 at 10:48 AM, Martin Dobias wonder...@gmail.com wrote: On Wed, Mar 2, 2011 at 12:25 AM, Alister Hood alister.h...@synergine.com wrote: But I think symbol levels should probably be enabled by default, in which case this tip wouldn't be necessary :) Rendering with symbol levels is more costly, so -1 for me to enable it by default. I remember debating this with you at Wroclaw. Is it more costly also in situations where symbols are simple and have 1 layer each only? In the case of multilayer symbols I would say 99% of the time I want symbol levels on. I do quite a lot of training and the symbol levels is something that a) new users struggle to comprehend and b) gets forgotten as a detail after the training and then people come back to me asking why their maps look funny. I think from a user friendliness point of view, there would be a lot gained by enabling it by default (performance issues notwithstanding). Maybe we should add it as another item in our endless options panel (which I will reorganise in Lisbon)? Hi Tim yes, it's more costly also for symbols with just one symbol layer. The idea is that the features in current view are loaded into memory first (with a reference to symbol that will be used) and then rendered. So there is some memory overhead and some cpu overhead (unsure about the total amount). The case with just one symbol layer could be probably optimized to some degree. I am not sure what to do here. The concept of symbol level is quite advanced and becomes more complex when drawing things like highway crossing (I still haven't found time to write a blog post explaining how that could be done). Maybe another topic for upcoming hackfest? :-) Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] mapserver getfeatureinfo
Hi I have the following problem: I Have a few shape-files, which I provide as WMS through qgis-mapserver and represent with OpenLayers on this site: http://asmaron.homelinux.net/ol/index.html (attention: slow! :-) ). Now, when I make a getfeatureinfo-request, i get a html-file with no content. Example: When i make the following Request: http://asmaron.homelinux.net/cgi-bin/qgis_mapserv.fcgi?LAYERS=Grenzen REASPECT=falseTRANSPARENT=trueFORMAT=image%2FpngSERVICE=WMS VERSION=1.1.1REQUEST=GetFeatureInfoSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_xml SRS=EPSG%3A32632BBOX=-656.807143%2C19.5%2C3056.807143%2C3580.5X=411Y=139 INFO_FORMAT=text%2FhtmlQUERY_LAYERS=GrenzenFEATURE_COUNT=1WIDTH=730HEIGHT=700 I get the following response: HEAD TITLE GetFeatureInfo results /TITLE meta http-equiv=Content-Type content=text/html;charset=utf-8 /HEAD BODY /BODY You can find the qgs here: http://asmaron.homelinux.net/test1.qgs Does anyone have any idea what I'm doing wrong? Thanks a lot and with best regards, Martin PS: I think it has something to do with the qgis-mapserver or the way I do the getfeatureinfo-request. This is the reason i write to the qgis-user-list ;-). ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Understanding the rule-based renderer
On Fri, Apr 8, 2011 at 11:36 AM, Andreas Neumann a.neum...@carto.net wrote: Hi, I am trying to better understand the rule based renderer. Which version is correct? a) QGIS is rendering all features of the first rule, then the second rule, etc, Features of the first rule are rendered first, features of the second rule on top of features from the first rule b) QGIS is rendering each feature on by one and decides which rule applies. I hope it is not version b), I hoped it behaves like version a) but it behaves a bit odd with my data. For my data it seems like the order of the rule has no influence on the rendering order ;-( Hi Andreas the rule based renderer uses the b) option: it goes through the features one by one and applies all matching rules (in the order in which they appear). Mayeul Kaufmann has done some work in order to support option a) by implementing support for symbol levels so that the rendering order can be overridden. My ultimate goal is to only support the option a) in a way how SLD specifies it: rules are grouped and these groups are rendered one after each other. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Rule renders and colour ramps
Hi Ramon On Sat, Apr 9, 2011 at 1:51 AM, Ramon Andinach cust...@westnet.com.au wrote: On a related thought to the recent questions about rule renders. Mostly I'm using the rules to define colour schemes that I can't work out how to get otherwise. Is there a way to define custom colour ramps? Particularly I'm thinking of colour brewer ramps. If there is, could someone point me in the right direction? Yes it is possible to define custom color ramps: either in Style manager dialog (menu Options - Style manager) or when selecting a color ramp for categorized/graduated renderer, the last item in the combo box is new color ramp. There is a support for gradients, random colors and colorbrewer ramps. Btw. you are doing a great job with the how do I do pages on the wiki! Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Rule renders and colour ramps
On Sun, Apr 10, 2011 at 2:54 AM, Ramon Andinach cust...@westnet.com.au wrote: On 09/04/2011, at 20:20 , Martin Dobias wrote: Hi Ramon On Sat, Apr 9, 2011 at 1:51 AM, Ramon Andinach cust...@westnet.com.au wrote: On a related thought to the recent questions about rule renders. Mostly I'm using the rules to define colour schemes that I can't work out how to get otherwise. Is there a way to define custom colour ramps? Particularly I'm thinking of colour brewer ramps. If there is, could someone point me in the right direction? Yes it is possible to define custom color ramps: either in Style manager dialog (menu Options - Style manager) or when selecting a color ramp for categorized/graduated renderer, the last item in the combo box is new color ramp. There is a support for gradients, random colors and colorbrewer ramps. Thanks for that. If I see properly, for colour brewers, I get to choose a colour pattern suite, how many colours are there and that's about it. Now, what happens if I was looking for something that was approximately like the Spectrum colourbrewer, but with the colours backwards (blues low, reds high) (or even define whole new colour suites). Is that possible? Unfortunately this is not (yet?) possible. We are still missing discrete color ramps which would allow you to define custom colors, allow reversing of colors etc. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] symbol rotation in Ruled based symbology
On Sat, Apr 16, 2011 at 8:32 PM, Saber razmjoo...@faunalia.co.uk wrote: Hi all, Is there an option to rotate a symbol in the New Symbology Ruled Based Yes :) In case you would like to rotate the symbol using a data-defined rotation while using the rule based renderer then the answer would be no. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] PyQGIS: how to create a layer in the console ?
Hi gene On Thu, Apr 28, 2011 at 8:38 PM, gene martin.lal...@gmail.com wrote: Hello, I'm trying to directly import Excel files with the Python module xlrd in the console: from PyQt4.QtCore import * import xlrd wb = xlrd.open_workbook('testxy.xls') sh = wb.sheet_by_index(0) for rownum in range(sh.nrows): ... print sh.row_values(rownum) ... [u'id', u'x', u'y', u'test'] [1.0, 235.0, 424.0, u'a'] [2.0, 245.0, 444.0, u'b'] It gives the xy values and the attributes So, I use the script create layer from http://www.qgis.org/wiki/Python_Bindings http://www.qgis.org/wiki/Python_Bindings with no problem for adding the layer and the points to the canvas except for the attribute table that remains empty The question is how to create a valid layer in the console? Please post a relevant part of your script that creates a layer and adds the data. Knowing your QGIS version would be helpful, too. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS + GRASS = Errors
Hi, 2011/5/5 vanhoesenj vanhoes...@gmail.com: Cannot start Module r.shaded.relief command: C:/OSGeo4W/apps/grass/grass-6.4.1/bin/r.shaded.relief.bat --interface-- description wild guess, it should have be `--interface-description` not `--interface--description`. Martin -- Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Re: grass plug in makes Qgis crash
Hi, I think the error will be hard to reproduce, as it works on my two laptops with exactly the same database (I tried copying the database, create completely new ones, always the same error, with every raster). This is what the terminal says: martin@martin-uni:~$ qgis Python support ENABLED :-) Loaded : QSpatiaLite (package: QspatiaLite) Loaded : MMQGIS (package: mmqgis) Loaded : Photo2Shape (package: photo2shape) Loaded : Raster Transparency (package: raster_transparency) Loaded : Plugins Starter plugin (package: pluginsStarter) Loaded : Plugin reloader (package: plugin_reloader) Loaded : OpenLayers Plugin (package: openlayers) Loaded : DEM relief shader (package: shadedrelief) Loaded : Spectral Profile (package: spectral_profile) Loaded : Forest Management Toolkit (package: eoFMT) Loaded : Electre Tri plugin (package: qgis_etri) Loaded : Merge shapes (package: mergeshapes) Loaded : Soil texture (package: SoilTexture) Loaded : Dockable MirrorMap (package: DockableMirrorMap) Loaded : fTools (package: fTools) Loaded : Raw raster file import (package: rawrasterfileimport) Loaded : Colour Scale Bar (package: bccscbar) Loaded : Profile (package: profiletool) Loaded : Value Tool (package: valuetool) Loaded : GdalTools (package: GdalTools) Loaded : 1-Band Raster Colour Table V1.x (package: bcccoltbl1) Loaded : Cartogram Creator (package: cartogram) Loaded : EasyPrint (package: easyprint) Loaded : RGB Composition Plugin (package: rgb) Loaded : QGIS File Browser (package: QGISFileBrowser) Loaded : Statist (package: statist) Loaded : Mirror Map Plugin (package: mirrormap) Loaded : Scattergram (package: scattergram) Loaded : Join lines (package: joinlines) Loaded : Shapefile Viewer (package: bccSHPV) Loaded : Measuring Vegetal Index (package: mv_plugin) Warning: QGraphicsScene::removeItem: cannot remove 0-item Loaded : Openlayers Overview (package: openlayersov) Loaded : RasterCalc (package: rastercalc) Loaded : Plugin Installer (package: plugin_installer) Loaded : OpenStreetMap plugin (package: osm) Warning: QGraphicsScene::removeItem: cannot remove 0-item Speicherzugriffsfehler When I load the Grass raster, it says Speicherzugriffsfehler, which means something like memory access error. When I try to load the rasters directly into Grass, there are absolutely no problems , so the database seems to be ok... Martin -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/grass-plug-in-makes-Qgis-crash-tp6413803p6416407.html Sent from the qgis-user mailing list archive at Nabble.com. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Re: grass plug in makes Qgis crash
Hi Micha, yes, the software versions are all the same (all from the ubuntu gis unstable launchpad).. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/grass-plug-in-makes-Qgis-crash-tp6413803p6416583.html Sent from the qgis-user mailing list archive at Nabble.com. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Re: grass plug in makes Qgis crash
Hi Paul, unfortunately it wasn't this easy. I reinstalled the whole operating system, now it works... -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/grass-plug-in-makes-Qgis-crash-tp6413803p6419120.html Sent from the qgis-user mailing list archive at Nabble.com. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Move python plugin to a network directory
On Wed, Aug 10, 2011 at 6:02 PM, HAUBOURG regis.haubo...@eau-adour-garonne.fr wrote: Hi list, I am looking after a simple method to deploy some custom python plugins on several servers inside our company network. As I understand it, today we have 3 solutions: 1- copy the plugins in C:\Program Files\Quantum GIS Wroclaw\apps\qgis\python\plugins of each server. We need to disturb our admin sys for this. 2- copy the plugins in each personnal user directory of these server: I prefer the first method... and my admin sys too 3- create a repository and let the users install and update plugins themselves.. They won't do the job I'm afraid. Ideally, we would like to put the plugins on a single shared network directory. Is there a way to have qgis look in it? No symbolic link on windows xp as far as I know. You can set QGIS_PLUGINPATH environment variable with a list of extra paths where to look for plugins. If specifying more one path then split them using semicolon on windows (colon on linux). Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Move python plugin to a network directory
On Thu, Aug 11, 2011 at 10:45 AM, HAUBOURG regis.haubo...@eau-adour-garonne.fr wrote: Thanks Martin, we tried it unsuccessfully. Does this work for python plugins? Do we have to modify he registry key to add the new plugin? Yes it shall work for python plugins. No need to modify registry. You can check whether QGIS has picked up the extra paths: open the python console in QGIS and type: qgis.utils.plugin_paths It will print a list of paths used to search for python plugins. By default there is always the system plugin path and per user plugin path. Cheers, Régis PS: Good news that night, our sys admin did the qgis 1.7 install to our 70 GIS citrix potential users... Nice. It would interesting to hear how do you use QGIS in your organization. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] python raw_input broken
raw_input() method reads data from standard input stream. I am afraid this will not work well on windows. We should probably redirect the standard input to the qgis python console in order to make this method working. Martin On Wed, Aug 10, 2011 at 1:59 AM, z x ph27g...@gmail.com wrote: With QGIS 1.6.0 python console on XP, input(), raw_input(), etc. don't work using the Enter key, returns EOFError when reading a line. What is wrong? ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] error message: Couldn't load PyQGIS. Python support will be disabled
On Sun, Aug 21, 2011 at 11:01 AM, zehari zehari mridua...@gmail.com wrote: dear all, is there any among you who can help me, I get an error message like the following: Couldn't load PyQGIS. Python support will be disabled. Traceback (most recent call last): File , line 1, in RuntimeError: the PyQt4.QtCore module is version 1 but the qgis.core module requires version -1 Python version: 2.7.2+ (default, Aug 16 2011, 07:56:26) [GCC 4.6.1] QGIS version: 1.8.0-Trunk 'Trunk', exported Python path: ['/python', '/home/zehari/.qgis/python', Hi the invalid python path suggest there is some clash with the libraries/modules. Please make sure to completely clean up your qgis installation and try again. This could be a result of some old c++ plugins in the (prefix)/lib/qgis directory or something similar - have you done any updates of Qt4, PyQt4 or sip recently? Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Re: [Qgis-developer] Status of the qgis-grass plugin, esp. on Windows
Hi, 2011/9/9 Paolo Cavallini cavall...@faunalia.it: - a grass-dev package, built overnight, is missing from osgeo4w; we think this is quite bad, as testing on win lags very much behind in this way; of course grass-only I am going to provide daily build packages for GRASS 6.4, 6.5 and 7.0 for OSGeo4W within few next days. users can install the standalone, but we think a complete environment is better; IOHO http://wingrass.fsv.cvut.cz/ Martin -- Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] plugin installer with unstable internet connections
On Wed, Sep 14, 2011 at 12:11 AM, Alister Hood alister.h...@synergine.com wrote: A shared directory *on a network server*? Is there a standard way to point QGIS to it? Yes. Use QGIS_PLUGINPATH environment variable to set additional paths where to look for python plugins. Multiple paths can be separated by semicolons (windows) or colons (unix). The priorities when loading plugins are following: 1. plugins from QGIS_PLUGINPATH 2. plugins from user's home directory 3. plugins from qgis installation directory Please note that plugin installer always saves newly downloaded plugins to user's home directory. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Re: [Qgis-developer] netiquette
On Mon, Sep 26, 2011 at 2:22 PM, Tim Sutton li...@linfiniti.com wrote: Rather something like: - please disable html mode in your mail client - please post inline, inserting your comments after each point in the original poster's message - please clip away extraneous / irrelevant content from the thread as the conversation goes on - please don't email posters offlist unless specifically invited to do so - please refrain from using expletives and making inflammatory comments - if you disagree with someone, please provide a considered and logical response explaining why a different approach should be taken Frankly I do not believe that posting these rules (or a link to them) will improve the communication :-) ... mainly because the people who do not respect the usual netiquette also tend to ask wrong questions, do not read documentation or even forget to sign themselves at the end of a mail. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Error when i try to install qgis1.7
On Fri, Sep 23, 2011 at 5:44 PM, Jules Kouadio seked...@gmail.com wrote: I get : qgsexpressionparser.yy:54.14-19: syntax error, unexpected string, expecting = make[2]: *** [src/core/qgsexpressionparser.cpp] Erreur 1 make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Erreur 2 make: *** [all] Erreur 2 Can someone help me ? Most probably you have an old version of 'bison' tool. However cmake should complain about that if you use a recent checkout from git. Could you please check what is the output if you run the following command? $ bison --version Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] What is GrASS really?
Hi, 2011/9/30 adams ad...@terrestris.de: just for making maps you for sure do not need GRASS, GRASS is the Geographic Raster Analysis Support System - a GIS tool for real working with GIS data, but definetely not for creating nice maps... ;-) that's not really true, see wxGUI Cartographic Composer [1] and ps.map module [2] ;-) Martin [1] http://grass.osgeo.org/wiki/WxGUI_Cartographic_Composer [2] http://grass.osgeo.org/grass64/manuals/html64_user/ps.map.html -- Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] how to invoke the save as image from the python console
On Fri, Oct 7, 2011 at 12:05 PM, Rhys A.D. Stewart rhys.stew...@gmail.com wrote: Greetings, hoping for a quick answer before i go diving through the API. is there a quick way to invoke the save as image dialogue from the console? o have a list of coordinates and would like to zoom in and get an image of each area around the coords? But since i have about 250 or so coords am not too keen on doing it manually...so then i really dont want the save as image box to come up really i want the functionality from the console. You can directly use QgsMapRenderer class to render the map to whatever target - in your case it would be a QImage that you can save to a file. PyQGIS cookbook gives an example how to construct and use map renderer. If you are going to use map canvas contents you may take advantage of map renderer from map canvas ( qgis.utils.iface.mapCanvas().mapRenderer() ) and only change extents and trigger the rendering. [1] http://www.qgis.org/pyqgis-cookbook/composer.html Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Proposed attribute table UI redesign
On Mon, Nov 14, 2011 at 5:54 AM, Nathan Woodrow madman...@gmail.com wrote: Hi all, Today I was looking at some different ways to redesign and optimize the attribute table UI and have come up with a design that I think works well but would like to get some feedback first. I have made two screenshots, showing the old and new dialog at the same size and using the same Qt theme. Just a plain comparison screenshot : http://dl.dropbox.com/u/6170988/Plain.png Comparison screenshot with notes : http://dl.dropbox.com/u/6170988/Noted.png Hi Nathan nice stuff. One more thing I have been thinking about is that we could do the search in a way the browsers nowadays do it: keep the widgets for search hidden by default, saving further vertical space. The search bar would be opened only after clicking a search button or pressing the usual ctrl+F or / shortcut. Final ideas: - show selected only may become a checkable tool button in the group of selection buttons - IMHO the move selected to top button may be removed. It used to be there from the ancient times of the attribute table when there was no show selected only option Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-developer] Re: [Qgis-user] Proposed attribute table UI redesign
On Thu, Nov 17, 2011 at 4:18 AM, Tim Sutton li...@linfiniti.com wrote: Hi On Mon, Nov 14, 2011 at 3:41 PM, Martin Dobias wonder...@gmail.com wrote: 8-snip--- nice stuff. One more thing I have been thinking about is that we could do the search in a way the browsers nowadays do it: keep the widgets for search hidden by default, saving further vertical space. The search bar would be opened only after clicking a search button or pressing the usual ctrl+F or / shortcut. Martin what is the possibility of making the search tool work across all columns efficiently? I know from training courses I give that selecting the appropriate column when making a search is a common stumbling block for many users. Right, by default we should search in all columns - I also find it tedious to always select the right column. To make it efficient we should probably just skip the search using the expressions and directly search for specified string within attributes of features. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Canvas Rotation
On Thu, Nov 17, 2011 at 1:34 PM, QGIS Brasil Comunidade brasileira qgisbra...@gmail.com wrote: Hi list, Is it possible rotate canvas and put the north to another direction than the top? Hi Arthur I believe it should be possible to use a custom Proj4 projection that would rotate the entire map. The north arrow decoration in QGIS computes the actual direction to the north, so it would be updated automatically. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] graduated symbols for point layers
On Mon, Nov 28, 2011 at 10:37 AM, Giovanni Manghi giovanni.man...@gmail.com wrote: This is tricky: if you select advanced - select scale field *before* hitting classify then the size symbols won't be scaled. If you do the other way it will work as expected. Feel free to open a ticket for that issue. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] New Labeling: conditional labels
Hi On Thu, Dec 29, 2011 at 11:33 AM, Nathan Woodrow madman...@gmail.com wrote: It would be handy to add condition statements to QgsExpression so we can support this kind of thing, Martin would be the guy to talk to about adding this kind of thing. He knows the most about QgsExpression. SQL recognizes CASE statement with following alternate syntax: 1. if equivalent: CASE WHEN x 10 THEN 'big' ELSE 'small' END 2. switch equivalent: CASE x WHEN 5 THEN 'five' WHEN 6 THEN 'six' ELSE 'something else' END The else is not required, if there is no matching when then NULL is returned. Some SQL engines add further functions for convenience: - MySQL [1]: IF(), IFNULL(), NULLIF() - PostgreSQL [2]: COALESCE(), NULLIF() I would suggest to implement the CASE statement to stay compliant with SQL syntax (although I find It a bit verbose). Regards Martin [1] http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html [2] http://www.postgresql.org/docs/8.1/static/functions-conditional.html ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] New Labeling: conditional labels
On Fri, Jan 6, 2012 at 1:25 PM, Martin Dobias wonder...@gmail.com wrote: SQL recognizes CASE statement with following alternate syntax: 1. if equivalent: CASE WHEN x 10 THEN 'big' ELSE 'small' END Just pushed a commit implementing that. The syntax is: CASE WHEN cond1 THEN exp1 [WHEN cond2 THEN exp2]* [ELSE exp3] END There may be one or more WHEN/THEN clauses. If no condition matches, the expression from ELSE is evaluated - if none is specified then NULL is returned. Note: the other syntax with base expression (CASE x WHEN y THEN z ... END) is not supported yet. Have fun! Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS and Computer Security (Windows)
On Sat, Feb 18, 2012 at 5:08 PM, Richard Males rbma...@gmail.com wrote: I would very much appreciate any thoughts on if/how QGIS currently deals with this, or references to documentation or postings on the issue. Hi Richard Contributed QGIS python plugins have similar security issues like any other extension code that can be downloaded. It is important to note that with _any_ python plugin downloaded from repository you cannot be 100% sure that no malicious code is inside. The server could have been hacked, an author's credentials could be stolen or even a previously trusted author could put on his black hat (and add some malicious code intentionally)... In case you are aiming for maximum security I would recommend to use one of following approaches: 1. host a local repository within your organization with known and safe plugins. It is really easy to set up one (a web server + repository xml file + plugin archives). A customized installation of QGIS would use this repository by default. This is a flexible approach and allows upgrading/adding plugins quickly by the admin and it is convenient for users. 2. disable python plugin installer completely in a customized installation, put there only chosen plugins. Less flexible, but more secure - no new plugins, no updates to plugins. (But still possible to add plugin installer or other plugins manually) 3. provide an installation without qgispython library - that effectively disables running python code within QGIS. Most secure, least flexible. Anyway, AFAIK qgis itself should never try to do anything where it would need admin rights. So another piece of security (for users with some admin privileges) would be to disable qgis to escalate its rights. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Re: [Qgis-developer] SEXTANTE for QGIS has been released
On Mon, Apr 2, 2012 at 9:59 AM, Victor Olaya vola...@gmail.com wrote: Thanks Radim That means that some distributions of QGIS might have a QT version lower that 4.7? The one I am using works fine, so i gues is 4.7. Is there any way of checking it on the fly, so I can execute that line only if the version is recent enough? Hi Victor in Python you can use 'hasattr' builtin function: edit = QLineEdit() if hasattr(edit, 'setPlaceholderText'): edit.setPlaceholderText('foo') Cheers Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Re: [Qgis-developer] SEXTANTE for QGIS has been released
On Mon, Apr 2, 2012 at 1:34 PM, Alexander Bruy alexander.b...@gmail.com wrote: minQtVersion = '4.6.0' def initGui(self): if qVersion() minQtVersion: QMessageBox.warning( self.iface.mainWindow(), Error, Your message) self.loadingCanceled = True return None Hi Alex there may be a problem with above code. Imagine that PyQt4 is built with e.g. Qt 4.2 - that means that it will provide only methods available in Qt 4.2 and below. If the user updates Qt version to 4.8, the new methods and classes will not be available in PyQt4, however qVersion() will return '4.8.0'. There is also PYQT_VERSION_STR variable in PyQt4.QtCore that returns the version of Qt used to build PyQt. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-developer] Re: [Qgis-user] PostGIS Manager compatibility issue with PostGIS 2.0
On Mon, May 7, 2012 at 3:25 PM, G. Allegri gioha...@gmail.com wrote: DB Manager works fine. The plugins overlap, but they are contributed plugins, so it's up to the user choosing wether to use DB Manager or the others. My note was directed to the PG Manager mantainer... As a maintainer of PostGIS Manager I would suggest you to move to DB Manager since I do not intend to maintain PG Manager and remove it completely in future. DB Manager is a viable replacement. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] QGIS Courses in Ethiopia and Kenya this July
Hello QGIS Users! My apologies for promoting a course I'm running in my first post, but I wanted to inform you all of two Open Source Mapping courses that Mapping Across Borders, a Canadian Non-Profit, will be running in July which I feel will be of great interest to many on this list. Over the past three years, Mapping Across Borders has run approximately a dozen Open Source Mapping courses to over 150 participants in East Africa. Our goal is to provide GIS knowledge and skill transfer through in person and virtual training programs. We run five day classes and cover GIS from the ground up using QGIS and other relevant software (Google Earth, GRASS, GPS Babel, etc.) and are currently building virtual resources training resources, including peer to peer and crowd mentoring services. At our in-person events our philosophy is to teach the concepts of GIS and apply them using free and open source software using examples from participant's experiences and job descriptions. When the program is complete, we follow up with participants at a personal and community level to ensure that the lessons learned at the course are able to be put into action. This July, we will be running two courses: Ethiopia Location: Addis Ababa, Ethiopia Venue: Agri Service Ethiopia Training Centre (behind Global Hotel) Skill Level: Beginner to Intermediate Date: July 9 - 13, 2012 Price: Starting at 3,000 Ethiopian Birr (see website for details) Included: Lunch each day tea/coffee/snacks Website: http://www.mappingacrossborders.org/index.php?option=com_contentview=ar ticleid=67Itemid=81 Kenya Location: Kisumu, Kenya Venue: Whirlspring Hotel Skill Level: Beginner to Intermediate Date: July 37 -27, 2012 Price: Starting at 16, 500 Kenyan Shilling (see website for details) Included: Lunch each day tea/coffee/snacks Website: http://www.mappingacrossborders.org/index.php?option=com_contentview=ar ticleid=68 All details of course content, pace and registration are available via our training websites. I welcome all of you to have a look at our courses and to follow up with me or the contacts posted online if you are interested in joining us, or are just looking for more information. If you have any other lists that you think may be interested in our course, please feel free to pass this email along or to send them my contact details (michael.mar...@ubc.ca). We would love to see some QGIS User list participants in East Africa this summer! Thank you, - Michael Martin - Michael Martin, BSc (Hon) Masters Candidate, Interdisciplinary Studies University of British Columbia, Okanagan Director, Mapping Across Borders Website: http://www.mappingacrossborders.org Blog: http://mikedotonline.blogspot.com Twitter: http://www.twitter.com/#!/mikedotonline LinkedIn: http://www.linkedin.com/pub/michael-martin/47/173/abb http://www.linkedin.com/pub/michael-martin/47/173/abb ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] QGIS MSSQL 2008 Data import problem
Dear all, We were – for the first time – trying to visualize some data held in SQL Server 2008 by a remote collaborator. The data are held in a table with a spatial column. I was hoping to use the new feature in QGIS, but was getting into troubles. After filling the DB parameters (in the pink icon in QGIS 1.8) I got this message: Driver not loaded Driver not loaded We filled all parameters in the connection window, without using Provider/DSN. System information: QGIS The about menu gives me: QGIS version 1.8.0-Lisboa QGIS code revision Compiled against Qt 4.8.1 Running against Qt 4.8.1 Compiled against GDAL/OGR 1.9.1 Running against GDAL/OGR 1.9.1 GEOS Version 3.3.2dev PostgreSQL Client Version 9.1.4 SpatiaLite Version 3.0.1 QWT Version 5.2.2 OS: Tested on Mac OSX (10.6.8) and Ubuntu / KUBUNTU I wonder where the problem is… I did not find any related comments on the Web. Thanks, Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS MSSQL 2008 Data import problem
Dear Noli, Thanks for the helpful posts. I managed to configure iODBC with an OpenLInk driver (not free, using a trial licence for the moment) on my Mac. The test connection from the iODBC Administrator is established without problem. I am however, not able to get the connection established through QGIS. It still complains that a driver is not found .To me, this suggests that the driver installed and discovered by iODBC is not discovered by QGIS Is there some environmental variable you need to set to make it work, for QGIS? Thanks, Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] [Qgis-developer] Cast your vote: Default icon theme for QGIS 2.0
2012/7/10 Yves Jacolin (free) yjaco...@free.fr: Am I the only one finding the new QGIS theme icon so ugly (sorry if the word seems strong, I can't find another one as my vocabulary is limited)? hm, are you referring to Robert's icon theme? Well this is really personal taste, and I would hesitate to use ugly in this regard (even my vocabulary is also limited). Feel free to design your icon set which will be less ugly for you. Good luck! Probably I am not used from the GRASS community to read such strong words. Martin -- Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] [Qgis-developer] Cast your vote: Default icon theme for QGIS 2.0
Hi, 2012/7/10 Daniel Lee l...@isi-solutions.org: I also think the GRASS theme is great, although I have to say that I'm a it's not a GRASS theme. wxGUI just uses part of icons from [1] which was designed by Robert Szczepanek as a generic GIS-related icon set (AFAIU). Martin [1] https://svn.osgeo.org/osgeo/graphics/trunk/toolbar-icons/24x24/ -- Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Sextante on Mac OS X: the solution for running R (problem of shell = True with Python subprocess on Unix systems)
I could not use R commands on Mac OS X, so, like with GRASS, I decided to analyze the Python scripts and the sextante log to understand what happens This time, no error in the log but no results either, no resulting shapefile in /Users/martinlaloux/sextante/tempdata. The temporary script /Users/martinlaloux/sextante/*sextante_script.r* has been created so the problem is again in the parameters of the Python module subprocess in * Rutils.py* (line 58): command = [R, CMD,BATCH, --vanilla, RUtils.getRScriptFilename(), RUtils.getConsoleOutputFilename()] proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE,stderr=subprocess.STDOUT, universal_newlines=True) Usually when I want to run an R script in Python, I use the command (see QGIS: run Python scripts from the Python Console or with Script Runner (without creating an extension) (in french QGIS : lancer des scripts Python ou des commandes Shell depuis la Console Python ou avec Script Runner http://www.portailsig.org/content/qgis-lancer-des-scripts-python-ou-des-commandes-shell-depuis-la-console-python-ou-avec-scrip ):http://www.portailsig.org/content/qgis-lancer-des-scripts-python-ou-des-commandes-shell-depuis-la-console-python-ou-avec-scrip subprocess.Popen(['Rscript','sextante_script.r'],stdout=subprocess.PIPE)) - *works* *But what about the solution of the script ?* If I try to run the procedure directly in the Python shell (with sextante_script.r obtained by the script): import subprocess doc=subprocess.Popen(['R', 'CMD', 'BATCH', 'sextante_script.r'],stdout=subprocess.PIPE) - *works* doc=subprocess.Popen(['R', 'CMD', 'BATCH', 'sextante_script.r'],stdout=subprocess.PIPE, stdin=subprocess.PIPE,stderr=subprocess.STDOUT, universal_newlines=True) - *works* doc=subprocess.Popen(['R', 'CMD', 'BATCH', 'sextante_script.r'], shell= True, stdout=subprocess.PIPE, stdin=subprocess.PIPE,stderr=subprocess.STDOUT, universal_newlines=True) - *no result * *Why ? * * The problem is shell= True* *with Unix systems. *I have already encountered this problem many times in my work **A good explanation is given in the stackoverflow.com question: Getting output from Python script in Python testshttp://stackoverflow.com/questions/9095733/getting-output-from-python-script-in-python-tests/9096104#9096104 * If you're using shell=True, don't pass the program and its arguments as a list* *but whith a string* - replacing the line 58 of Rutil.py by *command = R CMD BATCH --vanilla + RUtils.getRScriptFilename() + + RUtils.getConsoleOutputFilename()* proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE,stderr=subprocess.STDOUT, universal_newlines=True) * works because the result of command is a string* - or command = [R, CMD,BATCH, --vanilla, RUtils.getRScriptFilename(), RUtils.getConsoleOutputFilename()] *proc = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE,stderr=subprocess.STDOUT, universal_newlines=True)* *works also because shell=false.* The complete explanation is (from the question of stackoverflow): *On Unix, with shell=True: If args is a string, it specifies the command string to execute through the shell. This means that the string must be formatted exactly as it would be when typed at the shell prompt. This includes, for example, quoting or backslash escaping filenames with spaces in them. If args is a sequence, the first item specifies the command string, and any additional items will be treated as additional arguments to the shell itself.* I hope you understand why the original script does not work on Mac OS X, a Unix system. By modifying line 58, no more problem ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] QGIS Server - not displaying all layers
Hello everyone, I successfully installed qgis server and later also qgis webclient on two different servers. I have a problem with the amount of displayed layers. I am not able to display all layers. By turning on more than 4 layers the viewer stucks on loading the map and does not display the map. When I prepare project with more than 12 layers, the viewer even fails to start. I think it depends on the server configuration. I used stronger machine, but the problem persist. Does anyone have any idea how to solve it? S pozdravom / Best regards / Salutanta Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] How to run SEXTANTE algorithms outside of QGIS Python console?
Hello, I would like to make calls to GRASS and other packages available via SEXTANTE. How can I do that? I found this post which is very close to answering the question: http://gis.stackexchange.com/questions/28701/how-to-run-sextante-algorithms-outside-of-qgis-python-console/60725#60725 However when I try calling sextante.runalg I get an error seemingly related the fact that the code is not being run inside the QGIS Python console (qgis.utils.iface is None). Our software (naturalcapitalproject.org) is developed on Linux but packaged for Windows. Any suggestions? Thank you, Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] How to run SEXTANTE algorithms outside of QGIS Python console?
Hi Paolo, I just disabled digest mode, but hopefully this will be part of the same thread. My question is more specifically about SEXTANTE, if there is a better forum for this please let me know. My question is how to run SEXTANTE algorithms outside of QGIS Python console. Is this possible? The closest answer I found was on StackExchange here: http://gis.stackexchange.com/questions/28701/how-to-run-sextante-algorithms-outside-of-qgis-python-console The code provided runs, but when I add a call to sextante.runalg it raises an error related to iface, which seems to be something from QgisInterface.instance(). Specifically I get an AttributeError because iface == None. Another related post indicated that this kind of error is because the code is being run outside of QGIS and therefore there is no iface that could be referenced. In the code there is a commented out line that looks like a QGIS instance is wanted, but it wasn't working. Any suggestions? What would be most helpful is if someone could modify the code to include a single SEXTANTE call that executes any algorithm, preferable one from GRASS. Thank you. Here is the code: import sys from PyQt4.QtGui import QApplication from sextante.core.Sextante import Sextante def main(): main function or something # as per http://qgis.org/pyqgis-cookbook/intro.html#using-pyqgis-in-custom-application from qgis.core import * import qgis.utils app = QApplication(sys.argv) # supply path to where is your qgis installed QgsApplication.setPrefixPath(C:/OSGeo4W/apps/qgis, True) # load providers QgsApplication.initQgis() # how??? # qgis.utils.iface = QgisInterface.instance() Sextante.initialize() run_script(qgis.utils.iface) def run_script(iface): this shall be called from Script Runner Sextante.alglist() Sextante.alghelp(saga:slopeaspectcurvature) if __name__==__main__: main() -Martin Date: Wed, 15 May 2013 08:06:57 +0200 From: Paolo Cavallini cavall...@faunalia.it To: qgis-user@lists.osgeo.org Subject: Re: [Qgis-user] How to run SEXTANTE algorithms outside of QGIS Python console? Message-ID: 51932601.9080...@faunalia.it Content-Type: text/plain; charset=ISO-8859-1 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 14/05/2013 23:04, Martin Lacayo ha scritto: Our software (naturalcapitalproject.org) is developed on Linux but packaged for Windows. Hi Martin, could you please let us know more about this? I do not see any reference to QGIS. All the best. - -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlGTJgEACgkQ/NedwLUzIr60JgCeMZzOh+96CESwhbjdKFZ9Hlg4 BycAnicpMj4TZosMXotgIg9Xo+luGxtu =j3ao -END PGP SIGNATURE- ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] QGIS WPSclient PyWPS output data error
Hi, I'm running PyWPS service with some processes. Everything is working fine bud i wanted to try Qgis plugin WPS client and problems showed up. First thing is that my process takes a while but Qgis ends with Timed out even if statusSupported is set to True. The only way i found to deal with this was enlarging the time limit in Qgis for network. But i don't think that's the way it should work. Second is error which I get when process is done. Process returns geotiff With statusSupported=true, storeResponse=True and useMapscript=True/False (both). All these attemps ends with error: codetraceback (most recent call last): File /home/gis/.qgis//python/plugins/wps/QgsWpsDockWidget.py, line 816, in resultHandler return self.errorHandler(resultXML) File /home/gis/.qgis//python/plugins/wps/QgsWpsDockWidget.py, line 968, in errorHandler QMessageBox.critical(self.iface.mainWindow(), Exception report, exceptionHtml) TypeError: arguments did not match any overloaded call: QMessageBox.critical(QWidget, QString, QString, QMessageBox.StandardButtons buttons=QMessageBox.Ok, QMessageBox.StandardButton defaultButton=QMessageBox.NoButton): argument 3 has unexpected type 'NoneType' QMessageBox.critical(QWidget, QString, QString, int, int, int button2=0): argument 3 has unexpected type 'NoneType' QMessageBox.critical(QWidget, QString, QString, QString, QString button1Text=QString(), QString button2Text=QString(), int defaultButtonNumber=0, int escapeButtonNumber=-1): argument 3 has unexpected type 'NoneType'brbrbr/code Unfortunately I have no idea what does it mean. Thanks for any clue. Here is initialization of process and definition of the output. Whole process is pretty long and this should be enough. (http://pastebin.com/d750FWQF) http://pastebin.com/d750FWQF(http://pastebin.com/d750FWQF) Martin br___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] plugin installation
On Fri, Mar 7, 2008 at 9:43 AM, Richard Duivenvoorde [EMAIL PROTECTED] wrote: What about the idea that we all add a file 'version.txt' into the root of the zip. Is it possible for the repository (and so for the python plugin-installer) to serve that from the zip when people ask for it like: http://spatialserver.net/pyqgis/plugins/mapserver_export.zip?version or something like that? In that way we can put some plugin details and version information in it (a little more verbose then we do in the 'description'-field now. I'm really missing this more verbose version information when stuff is not working, and I want to know IF there is a newer version available, and what is fixed in that one...) On the upload of a plugin we can check for the existence of that file, like we check the zip now isn't it? This would be a nice addition... Gary, is it possible to implement this to your plugin repository? Basically if uploaded ZIP contains a specified file, e.g. README, it will allow you to download it (without downloading the whole plugin) or view it in plugin repository web. Another idea-balloon (sorry if I'm firing to much idea's): what if we ask maintainers of plugins to add a blog-item for every plugin. In that way as a maintainer you can give some more information (screendumps) about it, and other people can add comments on it, adding idea's patches or help? Actually, when uploading a plugin you can set a home page for it... isn't this exactly what you mean? Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Image-cataloge usage
On Thu, May 8, 2008 at 10:57 AM, Stephan Holl [EMAIL PROTECTED] wrote: Hi all, while using (win)QGIS 0.10.0 during a lessen very heavily (only one crash in 2 days!!) I wondered if it is possible to use image-catalogues (shapes) created by gdaltindex whithin QGIS? For some tasks this would be great benefit not to load 30 rasters by hand. Are there any options to accomplish this task? Hi, this looks to be a good task for a simple plugin for QGIS :) It's rather easy to load raster layers to map canvas using plugin interface, so it's just matter of creating a simple mechanism how to select the rasters... (I don't have experience with other GIS I have no idea how it's usually done) Bye, Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Re: python-shapely
On Fri, May 9, 2008 at 7:46 PM, Carson Farmer [EMAIL PROTECTED] wrote: [...] On a related note, does anyone know how to filter fields by type (i.e. only select numeric fields (int, double, etc.)? You can do it by checking value of QgsField.type() and using only fields with type QVariant.Int and QVariant.Double. Btw. the list of QGIS plugins on your page looks impressive! Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] How to probe raster values?
On Tue, May 13, 2008 at 7:10 PM, Borys Jurgiel [EMAIL PROTECTED] wrote: Hi Everybody! I'm working on a plugin in Python and I can't find any way to read values (at specified coordinates) from raster layers. I've tried with identify method of QgsRasterLayer object, but it's unavailable in my QGIS 0.10. Is this method depreciated, or only there is no Python binding for it yet? Is there any other way, or is that my time for switch to C? :) Hi, identify() method does exist, however it's not included in PyQGIS because of use of std::map as an argument (which is currently discouraged in favour of QMap). I'm affraid there's not other way in Python to do read values from raster layer. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] ubuntu 8.04 and python bindings
Hi, ok let's try to track down the problem. Do you use some package (which?) or do you compile qgis from source? Do you have any previous versions of QGIS installed on the system? What happens when you open console and type (supposing that your qgis installation is in /usr/local): $ export PYTHONPATH=/usr/local/share/qgis/python $ python then in python console do: from qgis.core import * Will it show some error? Martin On Tue, May 20, 2008 at 5:13 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I know it's an issue discussed many times but my qgis 0.10 can't load the python bindings. I have sip4 and pyqt installed. Any idea about path to set or how can I resolve or understand the problem ? Thanks, Michele ___ Migliaia di prodotti nuovi e usati a partire da 1 euro! http://rover.ebay.com/rover/1/724-7199-4110-179/4/?id=2 ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] ubuntu 8.04 and python bindings
On Tue, May 20, 2008 at 7:08 PM, Michele Ferretto [EMAIL PROTECTED] wrote: then in python console do: from qgis.core import * Will it show some error? Martin No, I don't see any error And what about this, does it work too? from qgis.gui import * Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] ubuntu 8.04 and python bindings
On Wed, May 21, 2008 at 2:47 PM, Michele Ferretto [EMAIL PROTECTED] wrote: But I'm wondering why importing the bindings doesn't fail if you set python path to /usr/share/qgis. Maybe the python modules are installed in /usr/lib/python2.5/site-packages or /usr/local/lib/python2.5/site-packages. Can you check it? (they're present if there's a subdirectory called qgis and it has several files inside: __init__.py, core.so, gui.so Yes! in /usr/lib/python2.5/site-packages/qgis there are all the files mentioned above; I copied these files in /usr/share/qgis/python/qgis/ just to try and now that's all right, I can use the python plugins. which is the path to change without having to copy the files? I'm getting the idea what probably happened. There are two ways where PyQGIS modules can be put. First possibility (default when compiling from source) is that modules are put to (prefix)/share/qgis/python/qgis path, second possibility (which is more suitable for packagers) is that the modules are put to python's site-packages directory (which is often used as place for custom python modules). I guess previously you have installed qgis 0.9.x (which supposedly used first variant) and then installed qgis 0.10. For some reason (I expect that once you've run qgis as root) python created __init__.pyc in /usr/share/qgis/python/qgis so uninstall of qgis 0.9 didn't delete this directory. Now, when qgis 0.10 finds this dir it thinks it contains PyQGIS modules which are in fact present elsewhere (but this directory has preference). Is my hypothesis correct? ;-) Regarding the correction of your problem - the best way is to leave contents of /usr/lib/python2.5/site-packages untouched and just delete /usr/share/qgis/python/qgis directory as root. Please confirm if that works for you. Bye, Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] [Fwd: Python problem]
Hi Paolo, On Sun, May 25, 2008 at 2:22 PM, Paolo Cavallini [EMAIL PROTECTED] wrote: anyone knows the origin (nad maybe a solution) for this problem? all the best. pc Messaggio Originale An error has occured while executing Python code: Traceback (most recent call last): File C:/Program Files/Quantum GIS/./python/plugins\plugin_installer\dialog.py, line 105, in installPlugin plugindir = str(QgsApplication.qgisSettingsDirPath()) + /python/plugins UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 29: ordinal not in range(128) this will be caused by some non-ascii characters in path reported by qgisSettingsDirPath(). Please try changing this expression: str(QgsApplication.qgisSettingsDirPath()) to: unicode(QgsApplication.qgisSettingsDirPath(),'utf-8') ... and let me know whether it helps, I can do the same also in trunk. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Re: [Qgis-developer] Python plugin development
On Tue, May 27, 2008 at 12:48 AM, Carson Farmer [EMAIL PROTECTED] wrote: Hello QGIS Python Plugin Developers, It has come to my attention that there are quite a few of us plugging away at various plugins (yes that was a bit of a pun ;) ). It has also occurred to me that many of us are probably working on very similar plugins, and that we are probably duplicating development efforts! So, I suggest we try to maintain some sort of list where we can keep each other up-to-date on what we are working on, what we are having trouble with, etc. This would also give people an opportunity to integrate plugin development efforts, and get help on specific problems etc. The PythonPluginsIdeas wiki page[1], is already setup to do this, so perhaps we should make a conscious effort to use it. [1] http://wiki.qgis.org/qgiswiki/PythonPluginIdeas I've added a page summarizing known plugin repositories - useful for both users seeking for plugins and developers seeking for code samples or ideas: http://wiki.qgis.org/qgiswiki/PluginRepositories Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Re: [Qgis-developer] New plugins: profiles and table management
On Mon, May 26, 2008 at 11:38 PM, Borys Jurgiel [EMAIL PROTECTED] wrote: Ladies and Gentlemans, Sorry I was so quiet last days, but I was writting a few plugins. A first three of them are already usable, so I ask you to testing :) Since my English is rather poor, also any language fixes will be priceless... Path to the repository: http://www.bwj.aster.net.pl/qgis/plugins.xml and to the little description: http://www.bwj.aster.net.pl/qgis/ Great to see some more plugins! ;-) 2) License problem. I used a few icons from QGIS main interface and two ones from a KDE theme, published under LGPL license. Do I have to mention about their origin? And can I use LGPL-licensed icons in the GPL-licensed program? Maybe the easiest way is to paint similar ones myself? AFAIK it's perfectly okay to use LGPL stuff in GPL software because LGPL is less strict variant of GPL useful mainly for libraries. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Change Projection in Projection Properties from a Python PlugIn
On Wed, May 28, 2008 at 5:59 PM, Ziegler Stefan [EMAIL PROTECTED] wrote: Hi Michael this is what I bookmarked a few days ago (for the same reason): http://doc.qgis.org/classQgsMapRender.html - setDestinationSrs(...) Hi, yes, Stafan is right, you can access map canvas by plugin interface, access its QgsMapRender instance (by mapRender() function) and change the destination SRS with the function mentioned above. Good luck Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Change Projection in Projection Properties from a Python PlugIn
On Thu, May 29, 2008 at 12:24 PM, bjsvwpfe [EMAIL PROTECTED] wrote: Hi, thanks for the answers. That was exactly what I'm searching for :jumping: So its possible for me to set the project settings now. But theres still a last little problem. I make the settings with the following code: srs = QgsSpatialRefSys() srs.createFromEpsg(21781) self.canvas = self.iface.getMapCanvas() self.canvas.setMapUnits(QGis.METERS) self.rect = self.canvas.extent() mapRender = self.canvas.mapRender() mapRender.setDestinationSrs(srs) mapRender.setProjectionsEnabled(1) self.canvas.refresh() But the project settings are not applied to the map. You still have to press the apply Button in the Project Settings. How can I solve this last problem so that it is not necessary to press the apply button. This should set the destination SRS to project settings: QgsProject.instance().writeEntry(SpatialRefSys,/ProjectSRSProj4String, proj4string) where proj4string is proj4 definition of the SRS and can be obtained from QgsSpatialRefSys Hope that helps Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] lines with arrowheads
On Tue, Jun 3, 2008 at 8:32 AM, Tim Sutton [EMAIL PROTECTED] wrote: Hi Yes if others are agreeable, I can add an option to vector props to enable / disable the arrows (default off). Still -0 for me, because it will just complicate things later. Drawing arrows should be done by renderer and should have configurable symbol, size, color, spacing etc. Anyway, if you're willing to apply that patch and make it configurable, take in account these issues: - missing test whether line.length() is not 0, otherwise you're later dividing by 0 - update for PyQGIS is missing - why #define PI when there's M_PI (in cmath) - magic numbers in code (like arrowSize=10) are bad Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] qgis0.10_lenny
Hi, it looks like something really strange is happening in your case: the errors are related to conversion between Python and Qt types. Thus I suspect your installation might contain some incompatible pieces or something like that. - have you installed qgis from a package or from source? - did you have some previous version of qgis installed? - is this happening from the time you've installed qgis or it might be caused by some upgrade? - what versions of packages python, python-qt4, python-sip4 do you have installed? Martin On Mon, Jul 7, 2008 at 2:50 PM, Salvator*eL*arosa [EMAIL PROTECTED] wrote: Salvator*eL*arosa wrote: Can somebody help me? When launching QGIS some plugins (almost all) not loads correctly. Here the log shell: Loaded /usr/lib/qgis/libcopyrightlabelplugin.so Loaded /usr/lib/qgis/libdelimitedtextplugin.so Loaded /usr/lib/qgis/libdelimitedtextprovider.so Loaded /usr/lib/qgis/libgeorefplugin.so Loaded /usr/lib/qgis/libgpsimporterplugin.so Loaded /usr/lib/qgis/libgpxprovider.so Loaded /usr/lib/qgis/libgrassplugin.so Loaded /usr/lib/qgis/libgrassprovider.so Loaded /usr/lib/qgis/libgridmakerplugin.so Loaded /usr/lib/qgis/libogrprovider.so Loaded /usr/lib/qgis/libpggeoprocessingplugin.so Loaded /usr/lib/qgis/libpostgresprovider.so Loaded /usr/lib/qgis/libquickprintplugin.so Loaded /usr/lib/qgis/libscalebarplugin.so Loaded /usr/lib/qgis/libspitplugin.so Loaded /usr/lib/qgis/libwfsplugin.so Loaded /usr/lib/qgis/libwfsprovider.so Loaded /usr/lib/qgis/libwmsprovider.so module 'mapserver_export' from '/usr/share/qgis/python/plugins/mapserver_export/__init__.pyc' module 'mapserver_export' from '/usr/share/qgis/python/plugins/mapserver_export/__init__.pyc' Error in sys.excepthook: Traceback (most recent call last): File string, line 2, in qgis_except_hook File string, line 11, in qgis_except_hook_msg TypeError: argument 1 of QgsMessageOutput.setTitle() has an invalid type Original exception was: Traceback (most recent call last): File string, line 1, in module File /usr/share/qgis/python/plugins/mapserver_export/mapserverexport.py, line 46, in initGui self.iface.addToolBarIcon(self.action) TypeError: argument 1 of QgisInterface.addToolBarIcon() has an invalid type module 'plugin_installer' from '/usr/share/qgis/python/plugins/plugin_installer/__init__.pyc' module 'plugin_installer' from '/usr/share/qgis/python/plugins/plugin_installer/__init__.pyc' Error in sys.excepthook: Traceback (most recent call last): File string, line 2, in qgis_except_hook File string, line 11, in qgis_except_hook_msg TypeError: argument 1 of QgsMessageOutput.setTitle() has an invalid type Original exception was: Traceback (most recent call last): File string, line 1, in module File /usr/share/qgis/python/plugins/plugin_installer/installer_plugin.py, line 33, in initGui self.iface.addToolBarIcon(self.action) TypeError: argument 1 of QgisInterface.addToolBarIcon() has an invalid type module 'arpat' from '/home/sam/.qgis//python/plugins/arpat/__init__.pyc' module 'arpat' from '/home/sam/.qgis//python/plugins/arpat/__init__.pyc' Error in sys.excepthook: Traceback (most recent call last): File string, line 2, in qgis_except_hook File string, line 11, in qgis_except_hook_msg TypeError: argument 1 of QgsMessageOutput.setTitle() has an invalid type Original exception was: Traceback (most recent call last): File string, line 1, in module File /home/sam/.qgis//python/plugins/arpat/ArpatPlugin.py, line 58, in initGui self.toolBar = self.iface.addToolBar(ARPAT) TypeError: argument 1 of QgisInterface.addToolBar() has an invalid type module 'bettertable' from '/home/sam/.qgis//python/plugins/bettertable/__init__.pyc' module 'bettertable' from '/home/sam/.qgis//python/plugins/bettertable/__init__.pyc' Error in sys.excepthook: Traceback (most recent call last): File string, line 2, in qgis_except_hook File string, line 11, in qgis_except_hook_msg TypeError: argument 1 of QgsMessageOutput.setTitle() has an invalid type Original exception was: Traceback (most recent call last): File string, line 1, in module File /home/sam/.qgis//python/plugins/bettertable/BetterTablePlugin.py, line 34, in initGui self.iface.addToolBarIcon(self.actionOpenTable) TypeError: argument 1 of QgisInterface.addToolBarIcon() has an invalid type module 'centroids' from '/home/sam/.qgis//python/plugins/centroids/__init__.pyc' module 'centroids' from '/home/sam/.qgis//python/plugins/centroids/__init__.pyc' Error in sys.excepthook: Traceback (most recent call last): File string, line 2, in qgis_except_hook File string, line 11, in qgis_except_hook_msg TypeError: argument 1 of QgsMessageOutput.setTitle() has an invalid type Original exception was: Traceback (most recent call last): File string, line 1, in module File /home/sam/.qgis//python/plugins/centroids/generateCentroids.py, line 60, in initGui
Re: [Qgis-user] qgis0.10_lenny
On Tue, Jul 8, 2008 at 1:15 AM, Borys Jurgiel [EMAIL PROTECTED] wrote: it looks like something really strange is happening in your case: the errors are related to conversion between Python and Qt types. I have noticed a quite similar problem in QGIS 0.10 @ Ubuntu 8.04. The new Installer doesn't see installed plugins, because the QgsApplication.qgisSettingsDirPath() method returns the QTextCodec object instead of QString. It's really suprising for me. Ubuntu 8.04 - QGIS 0.10 - python-qt4 4.4.2.0 - python-sip4 4.7.6.0 (all packages from ppa.launchpad.net) - python 2.5.2-2 - KDE 4.1 latest beta Hi Borys, could you try to investigate this a bit? I mean to try whether this behaviour persists with some other PyQt4 / SIP versions or whether it doesn't change when they're built from source... I can't replicate this behaviour using ubuntu 8.04 with python-sip4 4.7.3 and python-qt4 4.3.3. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Any errors when installing plugins under XP ?
2008/10/28 Borys Jurgiel [EMAIL PROTECTED]: Tuesday 21 of October 2008 22:06:47 Tara Athan napisał(a): I am using a QGIS 1.0 windows build on XP. I am trying to install the Geoprocessor plugin. I get the error message Python error An error has occured while executing Python code: Traceback (most recent call last): File C:/Program Files/QGIS-Dev/./python/plugins\plugin_installer\installer_gui.py, line 202, in requestFinished un.extract(tmpPath, pluginDir) # final extract. File C:/Program Files/QGIS-Dev/./python/plugins\plugin_installer\unzip.py, line 29, in extract os.mkdir(dir) WindowsError: [Error 3] The system cannot find the path specified: u'C:/Documents and Settings/Tara/.qgis/python/plugins' Another words, it seems Pluigin Installer can't create missing directories (python/plugins). Has anybody else experienced such error? Unfortunatelly I can't replicate it, though I'm doing what only crosses my mind ;) The Installer always creates missing directories. ... maybe you need to call os.makedirs() instead of os.mkdir() as it has to create first python and then plugins directory? Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS and ECW and MrSid formats
On Fri, Oct 31, 2008 at 11:20 AM, Micha Silver [EMAIL PROTECTED] wrote: Hi Agus: Agustin Lobo wrote: Hi! Could we clarify the situation for ecw and Mrsid formats in QGIS? (and perhaps put a note somewhere in the qgis web pages). The situation is, unfortunately, clear: The QGIS project can't allow itself to distribute software with support for formats which they themselves can not be further distributed. And that seems to be the case with ecw. I think that things are not really that bad. Today I've took a brief look at the licenses for ECW and MrSid and it seems that it's okay to build and distribute qgis with their pieces of software if we distribute only the binaries (i.e. not their SDKs). They additionaly request to add their copyright text to about box / readme. MrSid SDK allows only decoding, ECW also encoding, but only up to 500mb. And I think they also require that user accepts their EULA before using those formats. If there is a compiled version of gdal including support for these formats, why QGIS cannot? In any case, is there any workaround so that users can get to have ecw/Mrsid support out of their compiled version? Perhaps through a plugin? While I'm not a developer, the with my (very) little understanding of how QGIS and gdal interact, I don't think this is possible with a plugin. For all work with raster data (except WMS) we use GDAL. So, support for ecw/mrsid must be compiled against gdal. I really think that the final QGIS1.0 should be able to read in those formats, somehow. This is probably seen as a minor concern for developers, but a significant problem for users. I totally agree. My guess is that this will eventually be resolved if some kind soul will produce a QGIS+gdal pair of binaries with the ecw and/or mrSid libraries compiled in. Last time we exchanged our frustration with this situation, I even gave a name to the new gdal binaries: we need a gdal-good gdal-bad and gdal-ugly in the same fashion that licence encumbered audio codecs are released as binaries outside of the standard distro repositories. From what I've written above, I think everything is just a matter of packaging (and some more annoyances with license statements and copyright notices). - for windows we create the whole toolchain by ourselves so including these formats in GDAL is a matter of compiling GDAL with appropriate SDKs - for linux the situation is more complicated. users usually use gdal packages from their distribution, so we would need to produce alternative packages for several distributions which would be compatible with original ones. Or create qgis-with-gdal-ugly packages with GDAL inside (but that would be nasty solution) - for mac I have no idea Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] python import errors
On Thu, Nov 13, 2008 at 2:15 AM, José María Michia [EMAIL PROTECTED] wrote: I have noticed that /usr/local/lib/libqgispython.so.0.11 is out of date. I deleted the older version of the file / usr/local/lib/libqgispython.so.0.11 (and also libqgisgrass) QGIS and now works fine (without python and without grass, I guess). I think QGIS has not been properly compiled. I remember a message on ccmake said that Python is not being built, but imagine that it was not serious. Return to the compilation process and send a message with this problem. Ok, so this means that outdated libqgispython.so was from previous installation. I think some python-related configuration parameters for QGIS haven't been updated since the upgrade. The simplest way to fix it is remove the whole build directory and then build QGIS again (check messages from cmake whether it's going to build python support). Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] compiling qgis python
On Thu, Nov 13, 2008 at 3:19 AM, José María Michia [EMAIL PROTECTED] wrote: Hi. I cannot build QGIS with python support. In ccmake, after press c to configure, this message appears: Python not being built I press e to exit, and ccmake show these related variables and values: PYTHON_EXECUTABLE /usr/bin/python2.5 PYTHON_INCLUDE_PATH /usr/include/python2.5 PYTHON_LIBRARY /usr/lib/python2.5/config/libpython2.5.a I press c one more time, and the Python not being built persist. Pressing e to quit and g to generate the configuration. Support for python has not been compiled after running make I would suggest you to run 'cmake' command to see status/error messages. If python support is not being built, there should be a preceding message of some requirement not being fulfilled. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Error on loading python with simple quote in translation
On Thu, Nov 13, 2008 at 10:54 AM, Lionel Roubeyrie [EMAIL PROTECTED] wrote: Hi all, A syntax error occurs when loading python if the translation file contains simples quotes. I solved the problem by removing the simple quote in the translation file, but the best thing would be to change qgis_except_hook_msg definition to support simples quotes. Hi Lionel, you're right! For now you can work around this by inserting backslash before simple quote: \' I'll fix that so in final 1.0 release it will be escaped automatically. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Mac OS X: QGIS 1.0 Preview 2 Crashes
On Fri, Nov 14, 2008 at 3:35 AM, William Kyngesburye [EMAIL PROTECTED] wrote: It would be nice if PyQt/SIP and Qgis properly linked to python (I think Qgis takes its cue from SIP), then it would be easier to switch between the system python 2.5 and python.org 2.5. William, do you have any ideas how to improve the situation of QGIS python support on OS X? I don't know much about specifics of OS X but we could tweak python support with your assistence if you describe what's going wrong. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Mac OS X: QGIS 1.0 Preview 2 Crashes
On Sat, Nov 15, 2008 at 5:03 AM, William Kyngesburye [EMAIL PROTECTED] wrote: On Nov 14, 2008, at 7:04 PM, William Kyngesburye wrote: Hmmm... A possibility: compile and link statically as Qgis does now, use install_name_tool to change the python link to drop the path (this is how the Qt frameworks are initially). The linker at runtime then will use DYLD_FRAMEWORK_PATH and its internal default path to search for the python binary. A pseudo-dynamic linking, no need to fuss with dlopen() and searching for python or a preference. A user-installed python framework will override the system python, as expected. Victory! I patched SIP to compile as a bundle, with no direct link to Python. Rebuild PyQt and it followed. Rebuild Qgis, and the qgis-python modules are also now correct. Then, changed libqgispython to drop the full path to Python binary (I built with system Python). Glad to hear that! Thanks for the effort! Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-developer] Re: [Qgis-user] Announcing Qgis-mapper project
On Mon, Nov 17, 2008 at 8:30 PM, Tim Sutton [EMAIL PROTECTED] wrote: Me too! If you are developing in your own, what are your plans in terms of integration into QGIS trunk? I guess you need to modify core to some degree and then plan to put the rest of functionality out into python plugin space? I would welcome better renderer implementation (ideally that supports SLD spec). We'd like to integrate as much as possible directly into QGIS trunk. There will be quite some changes for core library. As there should be stable API for 1.x releases, we will have to integrate new features with care. Some things will be maybe shifted to 2.0 release if it won't be possible to integrate them to 1.x branch. Briefly what's planned for new renderer implementation: - multi-layer symbols (the greatest change) - more symbol layer types - e.g. simple line, marker line ... - rendering with special order (to allow drawing good-looking roads with outline) - rendering is done directly in renderer, not in vector layer - catalog of symbology I don't know whether it will be compatible with SLD specification, I'm not very familiar with it... How far from SLD is QGIS now? Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS Python Plugin Installer not UTF-8 aware?
2008/11/17 Borys Jurgiel [EMAIL PROTECTED]: def description(): return u'Danke schön' However... Installer do, but rest of QGIS doesn't support utf-8 in plugin metadata ;) I've fixed that in SVN trunk, from r9663 it supports also metadata in unicode :) Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Python binding for QgsMessageViewer
Hi again, On Thu, Nov 20, 2008 at 4:59 PM, Möri Cedric [EMAIL PROTECTED] wrote: Hi! In my current phyton plugin, I'd like to use QgsMessageViewer. It works well except for the setCheckBoxQSettingLabel which gives a attriubte error. Am I right, that this method is good to set a Qsetting to true or false? I'd like to have a don't show this message again kind of dialog and so it would be great if this could be added in the bindings, as I'm guessing that the error is triggerd by a missing binding. You're right, the binding was missing in QgsMessageViewer. I've added it in r9675. PS: thanks a lot to Martin for the qgsMapCanvasSnapper and the correction of the deactivate of the MapTools. All this stuff works very well now! You're welcome... if you find any more problems, let us know! Sometimes developers add new functions/classes to libraries and forget to add appropriate bindings. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] splitting polygons
On Wed, Nov 26, 2008 at 8:52 PM, Micha Silver [EMAIL PROTECTED] wrote: Looks to me like this bug: http://trac.osgeo.org/qgis/ticket/1025 has been resurrected from the grave. Using version 1.0.0 Preview II on ubuntu, any attempt to use the split polygon tool causes a crash. Seems to happen with shapefiles, but NOT with a PostGIS layer. Maybe it's not the same bug, the symptoms are a bit different. I've booked a ticket for exactly this problem few days ago: http://trac.osgeo.org/qgis/ticket/1424 The difference is that this one doesn't spit out an error message, just crashes always. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Problems with python plugins on Fedora
On Tue, Dec 9, 2008 at 7:07 PM, Carlos Gustavo Ruiz [EMAIL PROTECTED] wrote: El lun, 08-12-2008 a las 19:12 +0100, Martin Dobias escribió: On Sun, Dec 7, 2008 at 9:01 AM, Carlos Gustavo Ruiz [EMAIL PROTECTED] wrote: Hi there, my problem is that qgis can't load the python plugins.. I use Fedora 9 and have installer the qgis, qgis-python and qgis-grass packages.. searching my filesystem have found that the export_mapserver and the plugin_installer are in /usr/share/qgis/python/plugins directory but qgis search for the plugins in /usr/lib64/qgis. First of all, check whether python support in QGIS is working correctly. What QGIS version are you running? Im running QGIS 0.11.0.2 from the fedora repos.. I really dont use the binaries from http://download.qgis.org/ maybe it could be the best solution by the moment.. I suggest you to uninstall this version use a more recent package from the download page. If the problem persists, we can search for the reason. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Re: GRASS raster reading to QGIS 1.0.0 Kore
2009/1/4 Patrick Giraudoux patrick.giraud...@univ-fcomte.fr: Seems that I can narrow the question now. Actually, QGIS Kore reads GRASS maps well except when the maps have been created from raster ramp color have been optimized with i.landsat.rgb. For example in GRASS: r.composite r=etm7 g=etm5 b=etm2 out=south752brut makes a map 'south752brut' which is well read within QGIS Now if I do: i.landsat.rgb r=etm7 g=etm5 b=etm2 r.composite r=etm7 g=etm5 b=etm2 out=south752opt it makes a map 'south752opt' which is extremly long to read (several minutes), and when read makes change (displacement, zoom, etc...) extremely long to be displayed at a speed that prevent any work However, 'south752opt' and 'south752brut' are quick/normally displayed both at the same speed when on work within GRASS (e.g. d.rast south752opt) Any hint ? Hi Patrick, we're using GDAL library to access GRASS rasters, so the problem may be there. I would suggest you to try reading the raster in some other GDAL-based software [1] to see whether it also suffers slow performance. If so, file a bug for GDAL, if the problem happens only in QGIS file a ticket for QGIS with details. Martin [1] https://trac.osgeo.org/gdal/wiki/SoftwareUsingGdal ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] GPS active tracking plugin in qGIS
On Wed, Jan 14, 2009 at 7:47 AM, STEVENS Mike mstev...@parks.vic.gov.au wrote: I am wondering if anyone has developed a plugin to allow for live tracking? – i.e. Have a GPS connected (either via USB or Bluetooth) and let you track whilst having the software open with various layers? This would be very handy for real time positioning of monitoring / research plots and ground truthing survey points whilst out in the field. Advice greatly appreciated on 1. Has it been developed?, 2. Is the plugin available for MacOSx? 3. Where can I download it? There have been some efforts, but I'm not sure if there's something around ready to be used. In case you're ready to experiment with code, these resources might be useful: - a simple navigation plugin I started about two years ago in a branch of QGIS. Beware, the API and build system has changed quite a lot from that time so compiling it with recent QGIS sources won't be painless. I've used gpsd daemon for GPS input https://trac.osgeo.org/qgis/browser/branches/Lib_Refactoring-branch/src/plugins/navigation - a simple navigation application based on QGIS - Quantum Navigator - but it has only GPS simulator, missing a real GPS input http://www.mapserver.sk/~wonder/qnavigator/ Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Re: Problem with Postgis-Manager plugin on OSX
On Sun, Jan 18, 2009 at 2:21 PM, Andreas Neumann a.neum...@carto.net wrote: Hi QGIS-Users and Martin, I am trying to use the Postgis-Manager Plugin on OSX-Leopard. I installed psycopg2 and use QGIS 1.0 from http://download.osgeo.org/qgis/mac/qgis-1.0.0.dmg.gz When I try to load the plugin, I am getting an error message complaining about a UnicodeEncodeError - see text below. Any idea on what I could do to fix the problem? Hi Andreas, the plugin just wasn't prepared well for use with unicode strings. I've just released an updated version 0.4.5 which should fix all possible sources of this kind of errors, so give it a try to see whether it's fine. Now PostGIS Manager should be able to handle schemas, tables, column names and other identifiers with non-ascii characters fine. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] S57 map files
On Sun, Jan 18, 2009 at 6:52 PM, Chris h chris...@magma.ca wrote: On Sunday 18 January 2009 11:04:13 Florian El Ahdab wrote: - I believe Qgis doesn't use the S57 sublayers and that's why nothing gets displayed. Is there any chance that I am right? If I am right, Your most likely correct. Yes, QGIS always opens first sublayers and doesn't care about the rest. I would like to help with the implementation for this kind of problem. Can anyone in the dev team give me directions on where to begin (I have spent some time in the source and API of both Qgis and GDAL and feel I can contribute here...) Perhaps a good start would be reviewing the submitted material above and then following the directions and advice of the qgis development team. First of all, a small change in OGR provider in QGIS will be needed to allow sublayers. This provider awaits a file as input string - let's add an optional parameter that would specify the layer inside the file, e.g.: /data/gis/s-57/ca49995b.000layer=4 (note the added layer=4) Then in GUI: when an input file for OGR provider is selected, check whether there's more than one sublayer - if so, open a dialog and let user select which sublayers he would like to see. Create input strings for OGR provider from the chosen sublayers and load them. Patches are always welcome :-) Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] PyQGIS - problem opening shapefile
On Mon, Jan 26, 2009 at 8:06 PM, Tomasz Suchan tomasz.suc...@gmail.com wrote: Hi all, I'm trying to experiment with PyQGIS but I'm experiencing some problems... When adding shapefile I get: from qgis.core import * QgsApplication.setPrefixPath(/usr/share/qgis, True) Hi Tomasz, the prefix is incorrect. The path should be: /usr - in case you're using distribution packages /usr/local - in case you're using self-compiled installation with default settings If you've compiled QGIS with some non-default directory (e.g. /home/username/qgis) then use that path. The path is needed to determine where to search for provider modules and more stuff, so if it's not correct, providers won't be loaded. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Re: Symbology RFC
On Sun, Jan 25, 2009 at 1:05 AM, Martin Dobias wonder...@gmail.com wrote: http://wiki.qgis.org/qgiswiki/SymbologyRfc Voting about the RFC starts now and will end on 4 Feb. QGIS community members have the possibility to comment and vote on an RFC. Community members give comments and votes directly on the wiki page. Votes may be -1 (refusal), 0 (indifference), +1(acceptance). Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QgsCoordinateReferenceSystem in
On Thu, Jan 29, 2009 at 1:41 PM, Radosław Pasiok rpas...@gmail.com wrote: Hello list! I am happy OSGeo4W user with QGIS 1.0.0-5. I got strange things using QgsCoordinateReferenceSystem in a custom python script. For example, from the following script: from qgis.core import * QgsApplication.setPrefixPath(C:\OSGeo4W\apps,True) QgsApplication.initQgis() cs = QgsCoordinateReferenceSystem(2180) print EPSG ID:, cs.epsg() print Is it valid CRS? , cs.isValid() QgsApplication.exitQgis() I get: EPSG ID: 10 Is it valid CRS? False Hi, I haven't tried qgis from osgeo4w yet, but it's possible that the CRS is not found because of different paths to the qgis.db file (which contains database of CRS). By default it should be located (on windows) in resources subdirectory from the specified prefix path. In case it's different, you could use QgsApplication.setPkgDataPath(path) to change it. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Re: Feature inquiry: Multiple display windows?
Hi, 2009/1/31 G. Allegri gioha...@gmail.com: +1 It would be a unique feature respect other GIS systems. I've seen and used it only in Image Erdas... AFAIU the wish, I've seen it also in GRASS GIS ;-) Martin -- Martin Landa landa.martin gmail.com * http://gama.fsv.cvut.cz/~landa ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Ideas for QGIS plugin?
On Sat, Jan 31, 2009 at 5:17 PM, Paolo Cavallini cavall...@faunalia.it wrote: Florian Hillen ha scritto: first of all I want to thank everybody for the input an the suggestions. Some plugins are a bit to extensive for my bachelor thesis (I can maximal write about 40 pages), so I pick up the suggestion with the OpenStreetMap plugin and modify it a little. I'm glad of this. Please keep in touch with the community of devs: more effort is underway, eg http://gis-lab.info/programs/qgis/qgis-repo.xml Even more work is underway! We're going to release a native C++ OpenStreetMap provider for QGIS in few days. It will come also with OSM downloader and (very experimental) upload. Creating another OSM plugin would therefore cause just code duplication. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] PostGIS Manager plugin issue
On Sat, Jan 31, 2009 at 9:43 PM, Joe Larson j...@joelarson.com wrote: [...] /home/joe/.qgis//python/plugins/postgis_manager/postgis_utils.py, line 113, in get_info self._exec_sql(c, SELECT version()) File /home/joe/.qgis//python/plugins/postgis_manager/postgis_utils.py, line 504, in _exec_sql raise DbError(e.message, e.cursor.query) DbError: MESSAGE: current transaction is aborted, commands ignored until end of transaction block Check out newly uploaded version 0.4.7, maybe it will fix this problem. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Ideas for QGIS plugin?
On Mon, Feb 2, 2009 at 11:43 PM, Christopher Barker chris.bar...@noaa.gov wrote: Paolo Cavallini wrote: I've always been confused by that. But anyway, you could do it with Open Street Map tiles. Better take the vector data from OSM (see my previous suggestion): you can do more with that. Not if you want a nice streetmap as a basemap for something else -- it would take a lot of work to get QGIS to draw a map nearly as nice as the OSM ones. Indeed, I don't think it's possible. Chris, could you please explain your statement why it isn't possible? Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Ideas for QGIS plugin?
On Tue, Feb 3, 2009 at 10:33 PM, pcr...@pcreso.com wrote: Is it possible to have a second transparent map canvas, analogous to the Mapinfo cosmetic layer. This would allow, for example, a complex background map to remain static so a gps layer in the new canvas can be quickly refreshed without refreshing the entire map all the background layers, unless, of couser, the map extent changes. There are several times I've made simple changes to a small layer QGIS takes some time to re-render everything, when 99% of the refresh doesn't actually change anything. This could be accomplished by having two map canvases, so users could add static layers to the bottom one more dynamic ones to the top one, to suit their needs. This is already possible. But instead of cosmetic layer we talk about canvas items: map canvas contains rendered map and optionally any number of other map canvas items (see QgsMapCanvasItem class). Canvas items can be updated whenever needed and no re-render of map is required. Also rubber band (see QgsRubberBand) which is used for measuring distances and areas is a canvas item. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] #1211 Relative paths within QGIS project file
On Wed, Mar 4, 2009 at 9:41 AM, Agustin Lobo agustin.l...@ija.csic.es wrote: Magnus, Maybe there is a simpler, temporary workaround that would make users lives easier on this regard. When QGIS does not find a layer as stated in the qgs project, the user could have the choice of modifying the path that is going to be searched for that given layer and for the rest of layers. Note that, in 99% of the cases, the problem arises when the layers are in a portable disk that has been mounted on a different computer and gets a different path (i.e., in windows yo would have G:\mylayers instead of F:\mylayers and on linux you would have /media/transcend/mylayers instead of /disk/transcend/mylayers). So just a box to be optionally clicked stating Upgrade default path according to browsed layer (or something like that) in the same dialog in which the user is prompted to browse for the layer would not be the optimum solution but a very good one. Maybe the simplest way would be to add a checkbox Save with relative paths to file dialog when saving a project. The paths to layers will be automatically saved relatively to project's directory. This might need probably some heuristics on determining whether layer's URI is a file but seems like a simplest option, since when moving the files anywhere, it should just work. (my two cents) Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] styles for osm
On Fri, Mar 27, 2009 at 3:34 PM, Werner Macho werner.ma...@gmail.com wrote: Is there already a working Openstreetmap plugin for QGIS? Hi Werner, somewhere in the qgis-developer archive (about a month ago) you might find a link for openstreetmap provider + plugin we've done. Our qgis-mapper group is still hard working on it and soon we'd like to release another testing version. There are some problems when it comes to editing of geometries (due the specific format osm has), but basic tasks like opening .osm files, downloading data from server or some editing tasks (change object's tags, create or delete nodes/ways) work fine. Stay tuned :) Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Relational Databases and PostGIS formatting of Vector Data
On Thu, Apr 9, 2009 at 7:53 PM, Peter Willis pet...@borstad.com wrote: Carson Farmer wrote: Peter, What tool did you use to import the layer into POSTGIS? Quantum GIS. My guess is you actually used the SPIT plugin, which is a C++ plugin included with QGIS, and is a gui frontend to shp2pgsql... Just to clarify: SPIT plugin is not a frontend to shp2pgsql, it has its own logic. In addition to SPIT you can try to shp2pgsql command line tool or PostGIS manager plugin for qgis which actually is a simple shp2pgsql GUI :) Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Multiple Symbolization Rules per Layer
On Mon, Apr 20, 2009 at 11:13 AM, Andreas Neumann a.neum...@carto.net wrote: Hi, I have to symbolize our community's waste water network. My problem is that I need more than one symbolization rules per Layer. As an example the stroke should be derived from one attribute while the stroke-style (e.g. different stroke-dashing) should be derived from a different attribute. This means I would need more than one symbolization rule to correctly style this layer. Is this possible with QGIS or would I need to create a new attribute combining those attributes in a single attribute for symbolization? Hi Andreas, currently it's possible to use only one attribute for the symbolization, so combination of the two attributes should do the job. Another option would be to write a special renderer class, however this has its own glitches. Regards Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user