Re: [Qgis-developer] Does spatial index improve performance using the class QgsGeometry.intersects()?

2013-11-06 Thread Stefano Masera
Thank you very much. 
It's a good explanation. 
Only another think. 


Which is the difference to create a spatial index in this way: 


feat_all = layer.dataProvider().getFeatures() 

layer_spIndex = QgsSpatialIndex() 

for feat in feat_all: 
layer_spIndex .insertFeature(feat ) 


Or in this way: 


layer.dataProvider().createSpatialIndex() 


It seems to work only in the first case. 


Thanks 


Stefano 










- Messaggio originale -

Da: Daniel daniel...@gmail.com 
A: Stefano Masera stefano.mas...@arpa.piemonte.it 
Cc: qgis-developer qgis-developer@lists.osgeo.org 
Inviato: Lunedì, 4 novembre 2013 15:55:25 
Oggetto: Re: [Qgis-developer] Does spatial index improve performance using the 
class QgsGeometry.intersects()? 



Try it 

http://nathanw.net/2013/01/04/using-a-qgis-spatial-index-to-speed-up-your-code/ 



Best regards. 



On Mon, Nov 4, 2013 at 9:16 AM, Stefano Masera  
stefano.mas...@arpa.piemonte.it  wrote: 


Hi list, 

I don't know exactly how spatial index works, so I ask this question. 
I have two layers and I want to check which features of the first layer 
intersect the features of the second one. 
I write a simple script where I create the spatial index for both themes and I 
use the class QgsGeometry.intersects() to check the intersections. 

I cannot understand why the executing time is the same even if I create or I 
don't create the spatial index for the layers. 
Note: 
- The first layer (polilyne) has 2 features, the second (polygon) has 600 
features. 
- To test the script insert the path of a check file 
- To compare time executing you have to comments the two lines (21 and 22) in 
which I create the spatial index and cancel the file *.qix on the hard disk. 

Thanks 
Stefano Masera 



 
##input_layer1_polyline=vector 
##input_layer2_polygon=vector 

from qgis.core import * 
from PyQt4.QtCore import * 
from PyQt4.QtGui import * 
import processing 
import time 

# start time 
start_time = time.time() 

# opens a check file: insert path 
file = open(INSERT PATH,w) 

# gets vector layer 
layer1_polyline = processing.getobject(input_layer1_polyline) 
layer2_polygon = processing.getobject(input_layer2_polygon) 

# creates SpatialIndex 
layer1_polyline.dataProvider().createSpatialIndex() 
layer2_polygon.dataProvider().createSpatialIndex() 

# gets features from layers 
polyline_feat_all = layer1_polyline.dataProvider().getFeatures() 

for polyline in polyline_feat_all: 
# writes in a check file the polyline 
file.write(polyline:  + str( polyline.id ()) + \n) 

polygon_feat_all = layer2_polygon.dataProvider().getFeatures() 

for polygon in polygon_feat_all: 
if polyline.geometry().intersects(polygon.geometry()) == 1: 
# writes in a check file the intersect polygon 
file.write(\t + intersect polygon:  + str( polygon.id ()) + \n) 

# end time 
end_time = time.time() 

file.write(\n + Execution time:  + str(end_time - start_time) + \n) 

file.close() 

 



___ 
Qgis-developer mailing list 
Qgis-developer@lists.osgeo.org 
http://lists.osgeo.org/mailman/listinfo/qgis-developer 






-- 
Daniel Vaz 
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Rendering bugs: QGIS or Qt?

2013-11-06 Thread Martin Dobias
On Wed, Nov 6, 2013 at 2:05 PM, Denis Rouzaud denis.rouz...@gmail.com wrote:
 I would say yes for #8980, but no idea for #8974.

 I would let more aware people answer about Qt5.
 But if we have to change to Python 3, I think it would be considered as an
 API break as older plugins might not work anymore
 So, sadly, I suspect we won't see this happening very soon, willwe?
 Or maybe, if this time we take care of porting every plugins with 2to3?

Yes, moving to qt5 and python3 would break the existing plugins -
something we should leave for QGIS 3.0.

Anyway I believe the above mentioned issues are not Qt bugs:
- #8980 - it would help to have just one repetition of the input
pattern in the SVG to avoid the unwanted effect
- #8974 - something wrong with preparation of the image for the
pattern (there are various artifacts also when changing the angle)

Regards
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Topology editing in QGis

2013-11-06 Thread Radim Blazek
On Tue, Nov 5, 2013 at 5:21 PM, Ouyang Leyan
ouyang.leyan...@hotmail.com wrote:
  Topology models are usually using multiple geometry types (e.g. nodes,
  edges). Multi geometry type layers may also be useful for non 
  topological layers. How difficult would it be to support multiple
  geometry types in a single layer?
 The path I took for postgis topology was instead to keep layers
 separated. They are still correlated one-other (changes in one layer
 may result in changes propagating to other layers), but they are
 still seen as separate layers in the layer management, so that you
 can set their visibility independently and/or style them differently.

 I think it may be useful to have support for mixed geometry types
 within a single layer but don't feel any urgent need for them to
 edit topologies.

 How do you like the separated layers approach ? Do you think it could
 work for GRASS topologies ? I guess one limitation of it is that when
 you enter edit mode you do so in a single layer, thus implicitly
 (rather than explicitly) also editing correlated but
 not-marked-as-being-edited layers. But this would already be the case
 by opening the same datasource twice...

Basically you are suggesting the same as Sandro, right?

Terminology suggestion:
  * element layer - layer representing topological elements, e.g. nodes or edges
  * compound layer - higher level layer of compounds from elements,
e.g. polygons formed by edges
Users usually work with compound layers, element layers are only used
for editing or debugging.

 For the topology editing, I was thinking of considering the topology as a
 special group (or the vector layers as sublayers of a topology layer):
 * When adding a topology, all the vector layers (node, edge, face, etc.)
 would be added at once

Element layers would be added automatically when user starts editing
of compound layer or user has to explicitly add element layers group
before editing?

 * Each vector layer would appear independently in the layer tree, but be a
 part of the topology group

 * It would be impossible to turn editing on a single layer, editing state
 would be controlled at the topology group level, so if one layer is edited,
 all layers are. This would be explicitly shown.

 This allows to not touch anything for the visualization part, all the
 symbology can be applied on a single vector layer as usual.

Element layers will be displayed with topological meaning symbology
above compound layers? I.e. for example polygons symbolized according
to attributes + edges symbolized according to topology state?

 Only the editing features would have to be modified to deal with the 
 topological
 modifications of the other layers and keep everything consistent. Of course,
 the definition of consistent will depend on the kind of topology considered.

How would be implemented the consistency? Currently each layer
instantiates single provider and providers do not know anything about
each other. The changes have to be propagated to other layers via
provider because of different topology models. It means, that
topological providers have to keep opened data sources in static
members, and editing has to be done on those static members. After
each edit operation all providers/layers using the same data source
has to be informed about the change. How? Signals on provider level,
between providers sharing the same data source?

Radim

 I never used GRASS topology, I still have to learn about it, but I think
 this representation would be flexible enough to adapt to different
 situations. It would also be possible to build ad-hoc topologies with
 simple normal vector layers (shapefiles, etc.) and have editing operations
 follow basic topology rules including several layers, which is something I
 would like to see (I work with networks and casual users who can open
 shapefiles, but not install PostGreSQL). This kind of topology would be like
 an extension of the existing pseudo-topology editing, just extended to
 several layers.

 Pierre
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Multi-threaded Rendering in QGIS

2013-11-06 Thread Gino Pirelli
I don't know if it could help a open platform to fundraising... for
example: http://www.pledgebank.com/

probably it helps to spread the voice...

for example this is a successful fundrising related to spatial sw
http://www.pledgebank.com/postgistopology

ciao ginetto




On 5 November 2013 11:13, Peter Wells peter.we...@lutraconsulting.co.ukwrote:

 Hi Andreas,

 There have been no donors coming forward from the general email I sent out
 to the lists but I am in the process of asking an organisation here in the
 UK directly but have been delayed in this task due to various people being
 on holiday.

 The funding arrangement you describe sounds great.  I will be contacting
 others that you mentioned directly this week to see if we can raise further
 funding.

 In the meantime, as far as I am aware, the work on the MT has already
 begun.  I will chat with Martin and see how the programme ties with the 2.2
 release schedule.


 Kind regards,

 Pete

 -Original Message-
 From: Andreas Neumann [mailto:a.neum...@carto.net]
 Sent: 04 November 2013 16:31
 To: peter.we...@lutraconsulting.co.uk; qgis-developer@lists.osgeo.org
 Cc: Saber Razmjooei; martin.dob...@lutraconsulting.co.uk
 Subject: Re: Multi-threaded Rendering in QGIS

 Hi all,

 I am wondering if you had any feedback regarding the call for funding
 around the multi-threaded renderer.

 From the Swiss QGIS user group we decided to split this into 2013 and
 2014. We can already pay CHF 3000 (approx. €24xx - depening on the exchange
 rate) in 2013 (approval pending on Nov 21). We would then pay a similar
 amount then in early 2014.

 Did you hear back from others who could contribute financially?

 Can Martin already start with his work now? To me it would be important to
 get this in QGIS 2.2

 Best greetings,
 Andreas

 Am 21.10.2013 20:54, schrieb Peter Wells:
  Dear list,
 
 
 
  We are looking to embark on a project to make rendering in QGIS
 multi-threaded, boosting rendering performance and reducing drawing times.
  I’m turning to the list to see if this is something that any of you (or
 any organisations you know) would be interested in co-funding.
 
 
 
  Besides ourselves, the Swiss QGIS User Group has very kindly offered to
 fund the development.  We are looking to raise approximately €20k in total
 and are looking for minimum donations of €1000 to reduce administrative
 overhead.
 
 
 
  Please contact us if you’d like to help,
 
 
 
  Kind regards,
 
  Pete
 
 
 
  Peter Wells
 
  Lutra Consulting
  23 Chestnut Close, Burgess Hill, RH15 8HN
  http://www.lutraconsulting.co.uk www.lutraconsulting.co.uk
  Tel:  +44 (0)1444 848012
  Mob:  +44 (0)7704 781683
  SIP:  1507...@sipgate.co.uk
 
 
 
 
 
  --
  This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they are
 addressed.
  If you have received this email in error please notify the system
  manager. This message contains confidential information and is
  intended only for the individual named. If you are not the named
  addressee you should not disseminate, distribute or copy this e-mail.
 Please notify the sender immediately by e-mail if you have received this
 e-mail by mistake and delete this e-mail from your system. If you are not
 the intended recipient you are notified that disclosing, copying,
 distributing or taking any action in reliance on the contents of this
 information is strictly prohibited.
 
  Whilst reasonable care has been taken to avoid virus transmission, no
  responsibility for viruses is taken and it is your responsibility to
 carry out such checks as you feel appropriate.
 
  Saber Razmjooei and Peter Wells tradin  g as Lut  ra Consulting.
 
 



 --
 This email and any files transmitted with it are confidential and intended
 solely for the use of the individual or entity to whom they are addressed.
 If you have received this email in error please notify the system manager.
 This message contains confidential information and is intended only for the
 individual named. If you are not the named addressee you should not
 disseminate, distribute or copy this e-mail. Please notify the sender
 immediately
 by e-mail if you have received this e-mail by mistake and delete this
 e-mail from your system. If you are not the intended recipient you are
 notified
 that disclosing, copying, distributing or taking any action in reliance on
 the contents of this information is strictly prohibited.

 Whilst reasonable care has been taken to avoid virus transmission, no
 responsibility for viruses is taken and it is your responsibility to carry
 out
 such checks as you feel appropriate.

 Saber Razmjooei and Peter Wells trading as Lutra Consulting.
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list

[Qgis-developer] How to Raster layer setTransparency with pyQGis 2 ?

2013-11-06 Thread Geo DrinX
Hello All,


pyQGis 2  changed many things  :(

For example:  how is possible, now, to set the transparency of a raster ?

Before, simply was:

l_raster.setTransparency(50)


And now ?

Thank you for any info about it


Roberto
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] How to Raster layer setTransparency with pyQGis 2 ?

2013-11-06 Thread G. Allegri
Try using l_raster.renderer().setOpacity(0.5)

giovanni


2013/11/6 Geo DrinX geodr...@gmail.com

 Hello All,


 pyQGis 2  changed many things  :(

 For example:  how is possible, now, to set the transparency of a raster ?

 Before, simply was:

 l_raster.setTransparency(50)


 And now ?

 Thank you for any info about it


 Roberto

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Giovanni Allegri
http://about.me/giovanniallegri
blog: http://blog.spaziogis.it
GEO+ geomatica in Italia http://bit.ly/GEOplus
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] QGIS website download links

2013-11-06 Thread Jonathan Moules
Hi folks,

Couple of thoughts on the website:

1) - There doesn't seem to be a link to the weeklies, or at least not one I
can find on http://www.qgis.org/en/site/forusers/alldownloads.html

2) That same page has a link under QGIS testing which 404's -
http://download.opensuse.org/repositories/Application:/Geo/VERSION/ -
looking closer that link is on the page three times.

Jonathan

-- 
This transmission is intended for the named addressee(s) only and may 
contain sensitive or protectively marked material up to RESTRICTED and 
should be handled accordingly. Unless you are the named addressee (or 
authorised to receive it for the addressee) you may not copy or use it, or 
disclose it to anyone else. If you have received this transmission in error 
please notify the sender immediately. All email traffic sent to or from us, 
including without limitation all GCSX traffic, may be subject to recording 
and/or monitoring in accordance with relevant legislation.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QGIS website download links

2013-11-06 Thread Otto Dassau
Hi Jonathan,

Am Wed, 6 Nov 2013 11:24:19 +
schrieb Jonathan Moules jonathanmou...@warwickshire.gov.uk:

 Hi folks,
 
 Couple of thoughts on the website:
 
 1) - There doesn't seem to be a link to the weeklies, or at least not one I
 can find on http://www.qgis.org/en/site/forusers/alldownloads.html

 2) That same page has a link under QGIS testing which 404's -
 http://download.opensuse.org/repositories/Application:/Geo/VERSION/ -
 looking closer that link is on the page three times.

for openSUSE packages VERSION means you add the opensuse version you work
with instead, e.g.:
http://download.opensuse.org/repositories/Application:/Geo/openSUSE_12.3/

I will better describe it, so people know what to do...

Regards
Otto
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] How to Raster layer setTransparency with pyQGis 2 ?

2013-11-06 Thread Geo DrinX
Great, Giovanni !

Thank you

Roberto


2013/11/6 G. Allegri gioha...@gmail.com

 Try using l_raster.renderer().setOpacity(0.5)

 giovanni


 2013/11/6 Geo DrinX geodr...@gmail.com

 Hello All,


 pyQGis 2  changed many things  :(

 For example:  how is possible, now, to set the transparency of a raster ?

 Before, simply was:

 l_raster.setTransparency(50)


 And now ?

 Thank you for any info about it


 Roberto

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




 --
 Giovanni Allegri
 http://about.me/giovanniallegri
 blog: http://blog.spaziogis.it
 GEO+ geomatica in Italia http://bit.ly/GEOplus

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Segfault on load style...

2013-11-06 Thread sergio
I have the same problem how can I do to fix it?
Thanks in advance 



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Segfault-on-load-style-tp5075587p5087626.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] cpp-plugin for QGIS 2.0

2013-11-06 Thread SSchmidt
Hello,

now i try my luck here hoping not being ignored :-)

I want to write a plugin for QGIS 2.0 Dufour in C++. Do I have to take the 
sources/API from Version 1.8 (Lisboa)? It is right, that the actual API 
only can be used for the actual Releases(Weekly Master)? In this case I 
have to download the actual sources and recompile it everytime I want to 
deploy it?

Thanks for any suggestions.


Freundliche Grüße aus Leipzig
Susann Schmidt
Softwareentwicklung 

**

GFI - Gesellschaft für Informationstechnologie mbH
Philipp-Rosenthal-Straße 9
D-04103 Leipzig
Geschäftsführer: Andreas Richter
Amtsgericht Leipzig HRB 12054
USt.-IdNr.: DE179049354 Steuer-Nr.: 231/109/06412
ESRI Solution Partner  und   ER Mapper Reseller
Tel. 0341 961 3310Fax 0341 961 3311   Mail i...@gfi-gis.de
Web  www.gfi-gis.de  und  www.themenbrowser.de
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Segfault on load style...

2013-11-06 Thread sergio
I have the same problem how can I do to fix it?
Thanks in advance 



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Segfault-on-load-style-tp5075587p5087623.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] qgis plugin topog4qgis

2013-11-06 Thread giulianc51
hi all
(sorry for my bad english),

Giuseppe P. and I have posted a new experimental plugin topog4qgis;
it is a proof of concept intended to manage the surveys and to correlate
with the national cadastral services; 

unfortunately, in this preliminary version it is oriented towards the
italian cadastral service; Giuseppe and I hope to estend and generalize
the plugin; int his mind, we appreciate all suggestions and hints;

thx, best regards,
giuliano curti
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] cpp-plugin for QGIS 2.0

2013-11-06 Thread Andreas Neumann

Hi Susann,

As long as there is no API break, your C++ code should work across 
versions.


There was an API break shortly between 1.9 and 2.0.

If you target QGIS 2.0 or higher you do not have to deal with QGIS  
2.0.


You can get the sourcecode directly from github at 
https://github.com/qgis/QGIS/


See http://www.qgis.org/de/site/getinvolved/index.html for additional 
information how to get started.


Compilation has to be done for each platform and major version 
separately, as you have to link to the QGIS core libraries. If your 
plugin is just for inhouse you just need to target the versions and 
platforms you deal with. If it is for general usage and of general 
interests and good quality, it would be better to include your code in 
trunk with pull requests, so that packagers can bundle it with the 
installers.


Good luck,
Andreas

Am 2013-11-06 13:03, schrieb sschm...@gfi-gis.de:

Hello,

now i try my luck here hoping not being ignored :-)

I want to write a plugin for QGIS 2.0 Dufour in C++. Do I have to take
the sources/API from Version 1.8 (Lisboa)? It is right, that the
actual API only can be used for the actual Releases(Weekly Master)? In
this case I have to download the actual sources and recompile it
everytime I want to deploy it?

Thanks for any suggestions.

Freundliche Grüße aus Leipzig
 Susann Schmidt
 Softwareentwicklung

 **

 GFI - Gesellschaft für Informationstechnologie mbH
 Philipp-Rosenthal-Straße 9
 D-04103 Leipzig
 Geschäftsführer: Andreas Richter
 Amtsgericht Leipzig HRB 12054
 USt.-IdNr.: DE179049354 Steuer-Nr.: 231/109/06412
 ESRI Solution Partner und ER Mapper Reseller
 Tel. 0341 961 3310 Fax 0341 961 3311 Mail i...@gfi-gis.de
 Web www.gfi-gis.de und www.themenbrowser.de

___
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] cpp-plugin for QGIS 2.0

2013-11-06 Thread Richard Duivenvoorde
On 06-11-13 13:03, sschm...@gfi-gis.de wrote:
 
 Hello,
 
 now i try my luck here hoping not being ignored :-)
 
 I want to write a plugin for QGIS 2.0 Dufour in C++. Do I have to take
 the sources/API from Version 1.8 (Lisboa)? It is right, that the actual
 API only can be used for the actual Releases(Weekly Master)? In this
 case I have to download the actual sources and recompile it everytime I
 want to deploy it?
 
 Thanks for any suggestions.

Hi Susann,

Any reason to not write your plugin in python? It is much easier (to
start with).

But if you want to write a C++ for QGIS 2.0, you will have to program
against the 2.0 api:
http://qgis.org/api/2.0/

Myself I have no experience with writing cpp plugins, and I do not think
there is very much documentation about it..
I found this link:
http://hub.qgis.org/wiki/17/Writing_C++_Plugins_%5BNew%5D
I tried the plugin_builder.py script which is mentioned there, and all
was working/building fine (also a nice README). Only the links in the
created dialog are not ok anymore:

In particular look at the following classes:

QGisInterface
http://svn.qgis.org/api_doc/html/classQgisInterface.htm
QgsMapCanvas
http://svn.qgis.org/api_doc/html/classQgsMapCanvas.html
QgsMapTool
http://svn.qgis.org/api_doc/html/classQgsMapTool.html
QgsPlugin
http://svn.qgis.org/api_doc/html/classQgisPlugin.html

instead of
http://svn.qgis.org/api_doc/html
use
http://qgis.org/api/2.0/

Good luck and have fun (again... why not python?)

Where did you feel ignored anyway?

Regards,

Richard Duivenvoorde

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Error in stand-alone installer: cannot read xls files

2013-11-06 Thread Chrest, David
Folks,

 

It looks like there is an error in the QGIS 2.0.1 stand-alone installer.
I have this installed and my browser does not recognize .xls files and I
get a data type error when trying to add using Add Vector Layer - All
files that states: not a valid or recognized data source.

 

However, from what several people have indicated to me, QGIS installed
with the OSGeo4W installer, there is no problem adding .xls tables to
QGIS and the software performs just as expected like Anita Graser
describes on page 50 of her Learning QGIS 2.0 book.

 

Can the stand-alone installer be fixed so that it has the same
functionality as the OSGeo4W installer? A wise QGIS expert told me they
should have the same functionality.

 

Thanks so much,

David

 

David Chrest

Research GIS Analyst

RTI International

3040 Cornwallis Rd, PO Box 12194

Research Triangle Park, NC  27709-2194

 

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Topology editing in QGis

2013-11-06 Thread Sandro Santilli
On Wed, Nov 06, 2013 at 10:50:32AM +0100, Radim Blazek wrote:
 On Tue, Nov 5, 2013 at 5:21 PM, Ouyang Leyan
 ouyang.leyan...@hotmail.com wrote:

 Terminology suggestion:
   * element layer - layer representing topological elements, e.g. nodes or 
 edges
   * compound layer - higher level layer of compounds from elements,
 e.g. polygons formed by edges
 Users usually work with compound layers, element layers are only used
 for editing or debugging.

Terminology accepted, adding aliases:

 * element layer AKA primitives layer
 * compound layer AKA features layer

  For the topology editing, I was thinking of considering the topology as a
  special group (or the vector layers as sublayers of a topology layer):
  * When adding a topology, all the vector layers (node, edge, face, etc.)
  would be added at once

Note that this is the model used by the TopoViewer included with 
the DBManager plugin. It creates a group and adds different vector layers
for the primitives. I suggest you both take a look at it if not done yet,
just to have a common reference.

 Element layers would be added automatically when user starts editing
 of compound layer or user has to explicitly add element layers group
 before editing?

I guess this depends on the kind of editing we want to allow.

One level of editing is, imho, simply selecting which elements/primitives
takes part in the definition of the compound. This is an high-precision
editing level where it is ensured that no changes will occur in the
elements. For this kind of editing I envision a system that would
automatically add on the map one or more layers containing candidate
elements (one layer per element-type) to let user pick the one he wants.

Another level is modifying the elements that compose a compound.
I still don't know what would work for this second level, when coming
from editing of a compound layer, but it does sound like a short-cut
to open editing of the element layer. 

Yet another possibility is allowing arbitrary modification of the
shape of a compound and automatically add elements in the topology
to account for those changes. This is what I've implemented in QGIS
for editing of TopoGeometry (aka compound) layers.

 Element layers will be displayed with topological meaning symbology
 above compound layers? I.e. for example polygons symbolized according
 to attributes + edges symbolized according to topology state?

We should have good defaults, but still possibly also allow users to set
template styles for their element layers.
I think it makese sense to allow for symbolization of states, generally.
The states could be seen as dynamic attributes of the element tables.

We could eventually require a minimum set of attributes for these kind of
tables to unify symbology for them. Could you write down a list of the
states, to add to the terminology ?

  Only the editing features would have to be modified to deal with the 
  topological
  modifications of the other layers and keep everything consistent. Of course,
  the definition of consistent will depend on the kind of topology considered.
 
 How would be implemented the consistency? Currently each layer
 instantiates single provider and providers do not know anything about
 each other. The changes have to be propagated to other layers via
 provider because of different topology models. It means, that
 topological providers have to keep opened data sources in static
 members, and editing has to be done on those static members. After
 each edit operation all providers/layers using the same data source
 has to be informed about the change. How? Signals on provider level,
 between providers sharing the same data source?

I don't think we want to provide cross-provider topologies, do we ?
In that case each provider should take care of the required book-keeping
to maintain the link between layers related to the same topology.

--strk; 

 ()  ASCII ribbon campaign- against html e-mail
 /\  http://www.asciiribbon.org   - against proprietary attachments
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] r.profile in QGIS 2.0 crashes without any message

2013-11-06 Thread Enrico Gallo
Dear list,

I am trying to use r.profile within QGS 2.0 ( Windows 7, 64 bit), both
using an existing python GRASS script via the new processing command
line (writing the standard txt description) or from the older Grass
plugin shell

when running

C:\PROGRA~1\binr.profile.exe (script)
or
C:\PROGRA~1\QGISDU~1\apps\grass\grass-6.4.3\etc\gui\scriptsr.profile.exe (cli)

r.profile doesn't start  / crashes without any message

If started from GRASS GUI (always from QGIS 2.0 package), r.profile
doesn't give any problem

Any hint?

many thanks

enrico
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer