Re: [Qgis-developer] Topology editing in QGis
Hi Pierre, I have been incorporated into the core dev team very recently, and I am somehow assigned to the map tools ;) I put the dev list in copy, since there should be someone arond who's more aware on the topic. I saw that Martin Dobias was the committer for the topology editing [0]. Martin, do you have any suggstion on this? On the side, your fixes are more than welcome, thanks a lot for your work. Cheers, Denis https://github.com/qgis/QGIS/commit/2fc5e73 On 10/30/2013 03:37 PM, 欧阳乐岩 wrote: Hello, I saw that you merged my patches for several bugs in topology editing, that's great ! I also saw that I forgot yet again to update the SIP bindings, that's not that great ... Thanks for the correction, I'll be more careful next time. I was wondering what is the state of topology editing in QGis. Are you the maintainer for this part? I saw a few very promising posts such as http://hub.qgis.org/issues/3483 and http://strk.keybit.net/blog/2011/10/14/postgis-topology-iso-sqlmm-complete/ but that was two years ago and not much seems to have happened after that. Is there someone working on it? Is there a direction defined for topological editing in QGis? Should I continue resolving the bugs and expanding on the hackish topology editing currently present in QGis (let's face it, it is not very good ...), or is it useless and proper support is going to come? I can also try to help for this proper support but I am afraid it is a bit above my current free time and abilities ... Regards, Pierre ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Topology editing in QGis
Hi Denis Pierre On Thu, Oct 31, 2013 at 1:45 PM, Denis Rouzaud denis.rouz...@gmail.com wrote: I put the dev list in copy, since there should be someone arond who's more aware on the topic. I saw that Martin Dobias was the committer for the topology editing [0]. Martin, do you have any suggstion on this? Let me give some historical context first because I am afraid we are mixing two different things :-) For a long time QGIS has some support for topology editing. But that's not a proper topology editing as one may think - from documentation: The option Enable topological editing is for editing and maintaining common boundaries in polygon mosaics. QGIS ‘detects’ a shared boundary in a polygon mosaic and you only have to move the vertex once and QGIS will take care about updating the other boundary. Originally there were separate map tools for addition, removal and moving of points which were also doing updates to the shared boundaries of polygons if the topological editing was enabled. The old commit Denis is referring to was basically meant to add the same functionality also to the newly created node tool that was meant to replace the three separate tools. Now about real topology editing of data consisting of nodes and edges - as discussed already in issue #3483, there are various topology models (PostGIS topo, GRASS, OpenStreetMap, ...?) that would need slightly different set of tools and validation methods. I have not really investigated if it is possible to have a support to cover all of those models - or even it is worth it. Maybe for a start it would be enough to pick one and focus just on that (PostGIS topo being my personal favorite). In general I would love to see a new topology layer type in QGIS (next to vector and raster) that would bring native topology viewing and editing capabilities to QGIS. I am not aware of anyone working on that - if you can spend some time on that matter, I am sure you will make many people happy :-) Regards Martin ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Using QgsCategorizedSymbolRendererV2
Please, somebody help me! -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-QgsCategorizedSymbolRendererV2-tp5086683p5086771.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Opening composer from Python
Hi all, I need to create composer window with prepared composition from Python. There is an createNewComposer() method and seems this is what I need. I run simple test from Python console and it works, but when I tried to use same code from plugin QGIS crashes. Here is code for console: canvas = iface.mapCanvas() renderer = canvas.mapRenderer() composition = QgsComposition(renderer) composition.setPlotStyle(QgsComposition.Print) composition.setPrintResolution(300) composition.setPrintAsRaster(True) map = QgsComposerMap(composition, 5, 5, 200, 200) map.setNewExtent(canvas.currentLayer().extent()) composition.addItem(map) c = iface.createNewComposer() c.setComposition(composition) Any ideas what can be wrong? Maybe I miss something obvious? -- Alexander Bruy ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Using QgsCategorizedSymbolRendererV2
QgsSymbolV2 *defaultSymbol = QgsSymbolV2::defaultSymbol(layer-geometryType()); QgsCategorizedSymbolRendererV2* renderer = new QgsCategorizedSymbolRendererV2(, cropCategories(defaultSymbol)); renderer-setClassAttribute(fieldWithCropId); renderer-setSourceSymbol(defaultSymbol); layer-setRendererV2(renderer); foreach (FieldAreaEntity* ent, m_loaded_areas) { QgsFeature feature; layer-dataProvider()-getFeatures(QgsFeatureRequest(ent-featureId())).nextFeature(feature); int catIndex = renderer-categoryIndexForValue(feature.attribute(fieldWithCropId).toString()); QgsSymbolV2* symbol = layer-rendererV2()-symbolForFeature(feature); qDebug() Renderer: layer-rendererV2()-type() Source Symbol static_castQgsCategorizedSymbolRendererV2*(layer-rendererV2())-sourceSymbol() feature: feature.id() category: catIndex symbol: symbol feature value: feature.attribute(fieldWithCropId).toString(); } OUTPUT: CATEGORIZED: idx cropId {c1ca7354-2c2c-11e3-a07b-08002704c18f}::{c1ca7354-2c2c-11e3-a07b-08002704c18f}::FILL SYMBOL (1 layers) color 6,218,153,255 {c2009944-2a82-11e3-b55c-08002704c18f}::{c2009944-2a82-11e3-b55c-08002704c18f}::FILL SYMBOL (1 layers) color 255,170,127,255 {fe8b3eb4-2a82-11e3-a479-08002704c18f}::{fe8b3eb4-2a82-11e3-a479-08002704c18f}::FILL SYMBOL (1 layers) color 170,255,255,255 {2a3776e4-0fdb-11e3-984c-08002704c18f}::{2a3776e4-0fdb-11e3-984c-08002704c18f}::FILL SYMBOL (1 layers) color 3,141,139,255 {875ae144-16f2-11e3-8021-08002704c18f}::{875ae144-16f2-11e3-8021-08002704c18f}::FILL SYMBOL (1 layers) color 255,0,0,255 {2a3742e6-0fdb-11e3-a61a-08002704c18f}::{2a3742e6-0fdb-11e3-a61a-08002704c18f}::FILL SYMBOL (1 layers) color 255,85,127,255 {2a379296-0fdb-11e3-b0bc-08002704c18f}::{2a379296-0fdb-11e3-b0bc-08002704c18f}::FILL SYMBOL (1 layers) color 255,255,0,255 {16826b08-2a8f-11e3-8120-08002704c18f}::{16826b08-2a8f-11e3-8120-08002704c18f}::FILL SYMBOL (1 layers) color 85,170,0,255 {013bf5c0-2a8f-11e3-853b-08002704c18f}::{013bf5c0-2a8f-11e3-853b-08002704c18f}::FILL SYMBOL (1 layers) color 81,143,96,255 Renderer: categorizedSymbol Source Symbol 0x36ab2b0 feature: 33 category: 6 symbol: 0x0 feature value: {2a379296-0fdb-11e3-b0bc-08002704c18f} Renderer: categorizedSymbol Source Symbol 0x36ab2b0 feature: 34 category: 5 symbol: 0x0 feature value: {2a3742e6-0fdb-11e3-a61a-08002704c18f} Renderer: categorizedSymbol Source Symbol 0x36ab2b0 feature: 35 category: 5 symbol: 0x0 feature value: {2a3742e6-0fdb-11e3-a61a-08002704c18f} Renderer: categorizedSymbol Source Symbol 0x36ab2b0 feature: 36 category: 6 symbol: 0x0 feature value: {2a379296-0fdb-11e3-b0bc-08002704c18f} Renderer: categorizedSymbol Source Symbol 0x36ab2b0 feature: 37 category: 6 symbol: 0x0 feature value: {2a379296-0fdb-11e3-b0bc-08002704c18f} Renderer: categorizedSymbol Source Symbol 0x36ab2b0 feature: 38 category: 5 symbol: 0x0 feature value: {2a3742e6-0fdb-11e3-a61a-08002704c18f} Renderer: categorizedSymbol Source Symbol 0x36ab2b0 feature: 39 category: 6 symbol: 0x0 feature value: {2a379296-0fdb-11e3-b0bc-08002704c18f} Renderer: categorizedSymbol Source Symbol 0x36ab2b0 feature: 40 category: 1 symbol: 0x0 feature value: {c2009944-2a82-11e3-b55c-08002704c18f} Renderer: categorizedSymbol Source Symbol 0x36ab2b0 feature: 41 category: 5 symbol: 0x0 feature value: {2a3742e6-0fdb-11e3-a61a-08002704c18f} Renderer: categorizedSymbol Source Symbol 0x36ab2b0 feature: 42 category: 5 symbol: 0x0 feature value: {2a3742e6-0fdb-11e3-a61a-08002704c18f} So, why symbolForFeature is not set? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-QgsCategorizedSymbolRendererV2-tp5086683p5086778.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Opening composer from Python
From further test I see that crash occurs after setComposition() call 2013/10/31 Alexander Bruy alexander.b...@gmail.com: Hi all, I need to create composer window with prepared composition from Python. There is an createNewComposer() method and seems this is what I need. I run simple test from Python console and it works, but when I tried to use same code from plugin QGIS crashes. Here is code for console: canvas = iface.mapCanvas() renderer = canvas.mapRenderer() composition = QgsComposition(renderer) composition.setPlotStyle(QgsComposition.Print) composition.setPrintResolution(300) composition.setPrintAsRaster(True) map = QgsComposerMap(composition, 5, 5, 200, 200) map.setNewExtent(canvas.currentLayer().extent()) composition.addItem(map) c = iface.createNewComposer() c.setComposition(composition) Any ideas what can be wrong? Maybe I miss something obvious? -- Alexander Bruy -- Alexander Bruy ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Topology editing in QGis
On Thu, Oct 31, 2013 at 8:28 AM, Martin Dobias wonder...@gmail.com wrote: Hi Denis Pierre On Thu, Oct 31, 2013 at 1:45 PM, Denis Rouzaud denis.rouz...@gmail.com wrote: I put the dev list in copy, since there should be someone arond who's more aware on the topic. I saw that Martin Dobias was the committer for the topology editing [0]. Martin, do you have any suggstion on this? Let me give some historical context first because I am afraid we are mixing two different things :-) For a long time QGIS has some support for topology editing. But that's not a proper topology editing as one may think - from documentation: The option Enable topological editing is for editing and maintaining common boundaries in polygon mosaics. QGIS ‘detects’ a shared boundary in a polygon mosaic and you only have to move the vertex once and QGIS will take care about updating the other boundary. Originally there were separate map tools for addition, removal and moving of points which were also doing updates to the shared boundaries of polygons if the topological editing was enabled. The old commit Denis is referring to was basically meant to add the same functionality also to the newly created node tool that was meant to replace the three separate tools. Now about real topology editing of data consisting of nodes and edges - as discussed already in issue #3483, there are various topology models (PostGIS topo, GRASS, OpenStreetMap, ...?) that would need slightly different set of tools and validation methods. I have not really investigated if it is possible to have a support to cover all of those models - or even it is worth it. Maybe for a start it would be enough to pick one and focus just on that (PostGIS topo being my personal favorite). I would prefer something generic from the beginning. We started to talk about such common editing interface (PostGIS / GRASS) with strk in Zurich. IIRC we were able to find common editing methods. There should be some photos of our hand drawn schemas around and strk should have a paper with the list of methods. Strk, could you publish a scan of it somewhere on Web? Radim In general I would love to see a new topology layer type in QGIS (next to vector and raster) that would bring native topology viewing and editing capabilities to QGIS. I am not aware of anyone working on that - if you can spend some time on that matter, I am sure you will make many people happy :-) Regards Martin ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QgsRasterBlock.setColor(size_t, QRgb) in SIP
On Wed, Oct 30, 2013 at 10:50 AM, Martin Dobias wonder...@gmail.com wrote: On Wed, Oct 30, 2013 at 4:10 PM, Radim Blazek radim.bla...@gmail.com wrote: We should probably try to compile and run a tiny program (during CMake configure phase) that will return the value of sizeof(size_t) and from that generate a helper .sip file with correct definition for size_t. Is it enough to check only size? I think that unsigned and signed have also be distinguished. Yes, size_t should be unsigned integer, at least 16-bit long. http://stackoverflow.com/questions/1089176/is-size-t-always-unsigned But maybe there's a better way I am not aware of... Maybe the easiest would be to define our own typedef unsigned long qgs_size_t; Assuming that unsigned long is typically 32-bit, and it is not expected that images would not have more than 2^32 (~4E9) pixels, then yes, why not. I would just refrain from calling it anything similar to size_t to avoid confusion. qgssize, to follow Qt type names style? Martin ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] WMS provider in Python?
Hi all, In Python I would to parse WMS GetCapabilities: the main goal is to gather informations of all exposed layers I might be wrong, but in QGIS 2.0 API I didn't found any interface or class to achieve this. Instead in QGIS source there is qgswmsprovider.cpp that has all methods that I need. I already have a simple wms parser in python but possibly I wouldn't duplicate code... nor to use external python libraries like OWSLib. Any suggestion to achieve this without reinventing the wheel? TIA Enzo Ciarmoli ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS 2.0 point release?
Hi Nyall, I will happly release updated Packages for Fedora in my own Repo and I'm sure they will also be packaged for the official repository in Fedora 20. I am in favor of this plan. But the most heavily requested packages will probably be Ubuntu + OS X + Windows. So it would be nice to receive feedback of the respective maintainers. Do you have a plan about how to make sure, that the fixes did not introduce any regressions as side-effect? Regards and thank you for the offer, Matthias On 29.10.2013 23:21, Nyall Dawson wrote: Hey all, I'm just scoping things out -- if I was to go through all the commits which have hit master since the 2.0 release and apply any relevant bug fixes to the release-2_0 branch, what's the chance of getting this packaged up and released as a 2.0 point release? I'm happy to apply all the bug fixes, but packaging isn't in my skillset! Nyall ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS 2.0 point release?
Sure, I'll package for OS X. On Oct 31, 2013, at 6:43 AM, Matthias Kuhn wrote: Hi Nyall, I will happly release updated Packages for Fedora in my own Repo and I'm sure they will also be packaged for the official repository in Fedora 20. I am in favor of this plan. But the most heavily requested packages will probably be Ubuntu + OS X + Windows. So it would be nice to receive feedback of the respective maintainers. Do you have a plan about how to make sure, that the fixes did not introduce any regressions as side-effect? Regards and thank you for the offer, Matthias On 29.10.2013 23:21, Nyall Dawson wrote: Hey all, I'm just scoping things out -- if I was to go through all the commits which have hit master since the 2.0 release and apply any relevant bug fixes to the release-2_0 branch, what's the chance of getting this packaged up and released as a 2.0 point release? I'm happy to apply all the bug fixes, but packaging isn't in my skillset! Nyall - William Kyngesburye kyngchaos*at*kyngchaos*dot*com http://www.kyngchaos.com/ The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects. - the wisdom of Tarzan ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Topology editing in QGis
On Thu, Oct 31, 2013 at 09:43:49AM +0100, Radim Blazek wrote: I would prefer something generic from the beginning. We started to talk about such common editing interface (PostGIS / GRASS) with strk in Zurich. IIRC we were able to find common editing methods. There should be some photos of our hand drawn schemas around and strk should have a paper with the list of methods. Strk, could you publish a scan of it somewhere on Web? I'm completely blank about where that piece of paper can be. Maybe someone took a picture ? --strk; ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Topology editing in QGis
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 31/10/2013 09:43, Radim Blazek ha scritto: I would prefer something generic from the beginning. We started to talk about such common editing interface (PostGIS / GRASS) with strk in Zurich. IIRC we were able to find common editing methods. Agreed: IMHO it would be good to have a common GUI, to be used in a consistent (topological) way, writing to different backends. So yes, Pierre, it is interesting to many people, and no, nobody is actively working on this. 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.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iEYEARECAAYFAlJyahUACgkQ/NedwLUzIr4TJgCggbBT5fdqg9ZE7VgeDsol5EGU pwgAoJm4oO8Yw1O8Ib5g1jWJdkuJWkTF =nqU/ -END PGP SIGNATURE- ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS 2.0 point release?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 29/10/2013 23:21, Nyall Dawson ha scritto: I'm happy to apply all the bug fixes, but packaging isn't in my skillset! Hi Nyall, thanks for your offer, very interesting. Of course packagers will have to bear much of the burden of a new release, so they have a say on this. On the other hand, AFAIK we are going to release more often, so I wonder if it is worth the while backporting fixes while releasing a new version, with the same bugs fixed. 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.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iEYEARECAAYFAlJyhxgACgkQ/NedwLUzIr7SbwCfe1pI4DxzxV19OGx5RfsQKYGw qV4AoIhYnwrzNN4gTB/x0JSrVJNSiCY2 =GIBY -END PGP SIGNATURE- ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Topology editing in QGis
On Thu, Oct 31, 2013 at 3:28 PM, Sandro Santilli s...@keybit.net wrote: On Thu, Oct 31, 2013 at 09:43:49AM +0100, Radim Blazek wrote: I would prefer something generic from the beginning. We started to talk about such common editing interface (PostGIS / GRASS) with strk in Zurich. IIRC we were able to find common editing methods. There should be some photos of our hand drawn schemas around and strk should have a paper with the list of methods. Strk, could you publish a scan of it somewhere on Web? I'm completely blank about where that piece of paper can be. Maybe someone took a picture ? This is close to http://linfiniti.com/wp-content/uploads/2011/11/topology.jpg but not the list I mean. Radim --strk; ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer