Re: [Qgis-user] Updating multiple parent/child records simultaneously

2020-03-17 Thread Matthias Kuhn

Hi Alexandre, Ross,

Denis recently wrote a plugin that also handles batch management of 
relations. https://github.com/opengisch/qgis-relation-batchinsert


He is not reading the qgis user list but would be happy to share his 
thoughts if you get in touch with him.


Best regards

Matthias

On 3/17/20 2:19 AM, Alexandre Neto wrote:

Hi,

I have been looking for the same myself. I think I would be able to 
create a "replicate relations" plugin but I am missing a step... this one:


https://gis.stackexchange.com/questions/353309/open-feature-form-in-multi-edit-mode-using-pyqgis

The idea would be to, for each selected feature, create an row in the 
related table, then open them all with the multi editing form.


Alexandre Neto

On Wed, Oct 2, 2019 at 11:35 AM McDonaldR > wrote:


Hi list,

I’ve got a project set up in QGIS 3.4.x with a parent polygon
layer and a child attribute layer.  Each site polygon represents a
piece of land and can have multiple tasks associated with it
(grass cutting, weeding, pruning, etc.).  Sites can be made up of
multiple polygons.

With relations set up in the project it is easy to select a
polygon feature and update attributes.  It is easy to add or edit
associated tasks.  See screenshots below.  With multiple site
polygons selected I can use the “modify selected attributes
simultaneously” to update information.

I need to find a way to be able to select site polygons and add
the same associated task to each one.  For example, select all
site polygons that need grass cutting task associated with them,
assign the task and maintain the parent child relationship.  It
would be great if there was a way to do this through the form.

One solution I have been toying with is using a SQL query to
select the site polygons and insert into the associated tasks
table a new record associated with each polygon.  The query works
but I need a way to tie it into the form. Anyone got any
pointers?  Some python to call the SQL and get the selected
feature IDs from QGIS?

Thanks

Ross

Screenshot 1: https://nextcloud.mixedbredie.net/s/D7DFjs2PrcnEf7t

Screenshot 2: https://nextcloud.mixedbredie.net/s/EBzeTopsBcZBSJc

*Ross McDonald | *Geo-evangelist | Angus Council, Digital
Enablement and IT | Angus House, Orchardbank Business Park, Sylvie
Way, Forfar DD8 1AT*| t: 01307 49 22 39*

This message is strictly confidential. If you have received this
in error, please inform the sender and remove it from your system.
If received in error you may not copy, print, forward or use it or
any attachment in any way. This message is not capable of creating
a legal contract or a binding representation and does not
represent the views of Angus Council. Emails may be monitored for
security and network management reasons.Messages containing
inappropriate content may be intercepted. Angus Council does not
accept any liability for any harm that may be caused to the
recipient system or data on it by this message or any attachment.

___
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] Updating multiple parent/child records simultaneously

2020-03-16 Thread Alexandre Neto
Hi,

I have been looking for the same myself. I think I would be able to create
a "replicate relations" plugin but I am missing a step... this one:

https://gis.stackexchange.com/questions/353309/open-feature-form-in-multi-edit-mode-using-pyqgis

The idea would be to, for each selected feature, create an row in the
related table, then open them all with the multi editing form.

Alexandre Neto

On Wed, Oct 2, 2019 at 11:35 AM McDonaldR  wrote:

> Hi list,
>
>
>
> I’ve got a project set up in QGIS 3.4.x with a parent polygon layer and a
> child attribute layer.  Each site polygon represents a piece of land and
> can have multiple tasks associated with it (grass cutting, weeding,
> pruning, etc.).  Sites can be made up of multiple polygons.
>
>
>
> With relations set up in the project it is easy to select a polygon
> feature and update attributes.  It is easy to add or edit associated
> tasks.  See screenshots below.  With multiple site polygons selected I can
> use the “modify selected attributes simultaneously” to update information.
>
>
>
> I need to find a way to be able to select site polygons and add the same
> associated task to each one.  For example, select all site polygons that
> need grass cutting task associated with them, assign the task and maintain
> the parent child relationship.  It would be great if there was a way to do
> this through the form.
>
>
>
> One solution I have been toying with is using a SQL query to select the
> site polygons and insert into the associated tasks table a new record
> associated with each polygon.  The query works but I need a way to tie it
> into the form.  Anyone got any pointers?  Some python to call the SQL and
> get the selected feature IDs from QGIS?
>
>
>
> Thanks
>
>
>
> Ross
>
>
>
> Screenshot 1: https://nextcloud.mixedbredie.net/s/D7DFjs2PrcnEf7t
>
>
>
> Screenshot 2: https://nextcloud.mixedbredie.net/s/EBzeTopsBcZBSJc
>
>
>
>
>
>
>
>
>
>
>
> *Ross McDonald | *Geo-evangelist | Angus Council, Digital Enablement and
> IT | Angus House, Orchardbank Business Park, Sylvie Way, Forfar DD8 1AT*
> | t: 01307 49 22 39*
>
>
>
>
> This message is strictly confidential. If you have received this in error,
> please inform the sender and remove it from your system. If received in
> error you may not copy, print, forward or use it or any attachment in any
> way. This message is not capable of creating a legal contract or a binding
> representation and does not represent the views of Angus Council. Emails
> may be monitored for security and network management reasons. Messages
> containing inappropriate content may be intercepted. Angus Council does not
> accept any liability for any harm that may be caused to the recipient
> system or data on it by this message or any attachment.
> ___
> 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] Updating multiple parent/child records simultaneously

2019-10-02 Thread McDonaldR
Hi list,

I've got a project set up in QGIS 3.4.x with a parent polygon layer and a child 
attribute layer.  Each site polygon represents a piece of land and can have 
multiple tasks associated with it (grass cutting, weeding, pruning, etc.).  
Sites can be made up of multiple polygons.

With relations set up in the project it is easy to select a polygon feature and 
update attributes.  It is easy to add or edit associated tasks.  See 
screenshots below.  With multiple site polygons selected I can use the "modify 
selected attributes simultaneously" to update information.

I need to find a way to be able to select site polygons and add the same 
associated task to each one.  For example, select all site polygons that need 
grass cutting task associated with them, assign the task and maintain the 
parent child relationship.  It would be great if there was a way to do this 
through the form.

One solution I have been toying with is using a SQL query to select the site 
polygons and insert into the associated tasks table a new record associated 
with each polygon.  The query works but I need a way to tie it into the form.  
Anyone got any pointers?  Some python to call the SQL and get the selected 
feature IDs from QGIS?

Thanks

Ross

Screenshot 1: https://nextcloud.mixedbredie.net/s/D7DFjs2PrcnEf7t

Screenshot 2: https://nextcloud.mixedbredie.net/s/EBzeTopsBcZBSJc





Ross McDonald | Geo-evangelist | Angus Council, Digital Enablement and IT | 
Angus House, Orchardbank Business Park, Sylvie Way, Forfar DD8 1AT | t: 01307 
49 22 39


This message is strictly confidential. If you have received this in error, 
please inform the sender and remove it from your system. If received in error 
you may not copy, print, forward or use it or any attachment in any way. This 
message is not capable of creating a legal contract or a binding representation 
and does not represent the views of Angus Council. Emails may be monitored for 
security and network management reasons. Messages containing inappropriate 
content may be intercepted. Angus Council does not accept any liability for any 
harm that may be caused to the recipient system or data on it by this message 
or any attachment.
___
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