Re: [QGIS-Developer] Paste geometry functionality

2023-11-29 Thread Tomas Straupis via QGIS-Developer
Hello

  Regarding different plugin proposals. I have checked nexta plugin
and even submitted a fix to it which solved the problem only
partially. From what I see it cannot be solved nicely via python
because of different environment/setup reasons. I know this can be
done in some way using different other plugins. This can also be done
by one line of code in postgresql.

  The point is that people migrating from "other" products are used to
such basic feature and that feature is wanted/required for quite a
number of different tasks.

  I got the main information: there are no objective reasons for such
functionality not to be in core. I will therefore try implementing it.

  Thank you for your responses!

-- 
Tomas
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Paste geometry functionality

2023-11-29 Thread Germán Carrillo via QGIS-Developer
Hi Tomas,

  Let's say we have a layer L (PostgreSQL/PostGIS) with features A, B
>
> and C with corresponding attribute values set.
>   Now some external party sends us a shapefile S with an updated
> geometry G which we want to apply to feature B.
>   We want to:
>   1. Select G in layer S and press Ctrl+C
>   2. Select feature B in layer L (layer is in edit mode).
>   3. Do "Paste geometry" which should change geometry of feature B but
> leave all attribute values intact. This must be an update (not
> delete/insert) operation for record B in database table, as database
> would usually have different sequences, triggers with business logic
> etc.
>
>
Do you happen to have a common field in your layers L and S, which
allows you to know that geometry G goes to feature B?
If that's the case, you could apply all geometry updates at once, based on
this common field.

In its current version (v1.5.0), the plugin "Append Features To Layer" can
update features based on common field values (e.g., an ID or a code).
It'd be simple to add a "Only update geometries" option. I've just created
a feature request [1], feel free to join if you'd like to help testing a
dev version.


*Disclaimer: I wrote the plugin :)*

Regards,

Germán
---
[1] https://github.com/gacarrillor/AppendFeaturesToLayer/issues/22


El mié, 29 nov 2023 a las 13:52, Keith Jenkins via QGIS-Developer (<
qgis-developer@lists.osgeo.org>) escribió:

> > I am aware of a python plugin for that but it does not work for
> > large geometries as clipboard size limit is reached pretty fast on
> > windows.
>
> Hi, Tomas.
>
> I just tested the "Geometry Paster" plugin and also ran into this
> clipboard size limit.  It looks like the code for the plugin tries to
> avoid this problem:
>
> csv.field_size_limit(sys.maxsize)
>
> But this doesn't seem to have the intended effect.  On my machine,
> sys.maxsize is 9223372036854775807, which appears to be too large for
> setting the csv.field_size_limit.  One workaround would be to open the
> QGIS Python console and set it manually to the maximum longint value:
>
> csv.field_size_limit(2147483647)
>
> It looks like there is already a pull request to fix this in the
> plugin, from just 3 days ago:
> https://github.com/nextgis/qgis_geometry_paster/pull/12/files
>
> Cheers,
> Keith
>
> On Tue, Nov 28, 2023 at 3:37 PM Tomas Straupis via QGIS-Developer
>  wrote:
> >
> > Hello
> >
> >   I was wondering, is there any reason why "paste geometry" (for
> > vector features) is not implemented in QGIS? Or is it simply because
> > nobody implemented it (I'm thinking of trying to do that)?
> >
> >   The use case is different government cadastres where geometry is
> > provided by external institutions and institution responsible for
> > maintaining the cadastre is adding the attribute values. While they
> > can use full feature paste (with attributes) for initial record
> > creation, updating requires the possibility to paste geometry only
> > without changing any attribute values.
> >
> >   Thank you
> >
> > P.S. I am aware of a python plugin for that but it does not work for
> > large geometries as clipboard size limit is reached pretty fast on
> > windows.
> >
> > --
> > Tomas
> > ___
> > QGIS-Developer mailing list
> > QGIS-Developer@lists.osgeo.org
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>


-- 
---
   |\__
(:>__)(
   |/
Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
https://twitter.com/GeoTux2 


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Unapproved Style in QGIS HUB

2023-11-29 Thread Antonio Locandro via QGIS-Developer
Thank you Tim,

No intention on pointing fingers at all just was wondering who could I contact 
in case it took much longer.

I think the updated workflow could reduce the amount of time required to review 
updates in theory

On Nov 29, 2023, at 2:29 PM, Tim Sutton  wrote:


Hi Antonio

It's me! (and a few others) that review. My apologies, there is a long standing 
issue that the notification of style updates go to spam and I can't 'untrain' 
the rules (despite trying many times).

I think your proposal makes sense that authors can self approve after the 
initial review. Lova could you help us to implement this workflow?

Regards

Tim

On Wed, Nov 29, 2023 at 6:46 PM Antonio Locandro via QGIS-Developer 
mailto:qgis-developer@lists.osgeo.org>> wrote:
Hi all,

Wondering who is in charge of approving new/update styles in the hub? I had one 
style "aviation" which I updated and now it is no longer visible as it is 
marked pending for review, I uploaded a new version today also trying to 
trigger the review since it has been a bit long.

Probably would be good to have some way to update styles without going through 
a vetting procedure which is good for new styles but a bit cumbersome for 
updates.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


--
--
​[https://kartoza.com/files/KartozaNewLogoThumbnail.jpg]

Tim Sutton
Kartoza Co-Founder
Visit http://kartoza.com to find out about open source:
 * Desktop GIS programming services
 * Geospatial web development
* GIS Training
* Consulting Services
Tim is a member of the QGIS Project Steering Committee
---
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Unapproved Style in QGIS HUB

2023-11-29 Thread Tim Sutton via QGIS-Developer
Hi Antonio

It's me! (and a few others) that review. My apologies, there is a long
standing issue that the notification of style updates go to spam and I
can't 'untrain' the rules (despite trying many times).

I think your proposal makes sense that authors can self approve after the
initial review. Lova could you help us to implement this workflow?

Regards

Tim

On Wed, Nov 29, 2023 at 6:46 PM Antonio Locandro via QGIS-Developer <
qgis-developer@lists.osgeo.org> wrote:

> Hi all,
>
> Wondering who is in charge of approving new/update styles in the hub? I
> had one style "aviation" which I updated and now it is no longer visible as
> it is marked pending for review, I uploaded a new version today also trying
> to trigger the review since it has been a bit long.
>
> Probably would be good to have some way to update styles without going
> through a vetting procedure which is good for new styles but a bit
> cumbersome for updates.
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>


-- 
--
​

Tim Sutton
Kartoza Co-Founder
Visit http://kartoza.com to find out about open source:
 * Desktop GIS programming services
 * Geospatial web development
* GIS Training
* Consulting Services
Tim is a member of the QGIS Project Steering Committee
---
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Paste geometry functionality

2023-11-29 Thread Keith Jenkins via QGIS-Developer
> I am aware of a python plugin for that but it does not work for
> large geometries as clipboard size limit is reached pretty fast on
> windows.

Hi, Tomas.

I just tested the "Geometry Paster" plugin and also ran into this
clipboard size limit.  It looks like the code for the plugin tries to
avoid this problem:

csv.field_size_limit(sys.maxsize)

But this doesn't seem to have the intended effect.  On my machine,
sys.maxsize is 9223372036854775807, which appears to be too large for
setting the csv.field_size_limit.  One workaround would be to open the
QGIS Python console and set it manually to the maximum longint value:

csv.field_size_limit(2147483647)

It looks like there is already a pull request to fix this in the
plugin, from just 3 days ago:
https://github.com/nextgis/qgis_geometry_paster/pull/12/files

Cheers,
Keith

On Tue, Nov 28, 2023 at 3:37 PM Tomas Straupis via QGIS-Developer
 wrote:
>
> Hello
>
>   I was wondering, is there any reason why "paste geometry" (for
> vector features) is not implemented in QGIS? Or is it simply because
> nobody implemented it (I'm thinking of trying to do that)?
>
>   The use case is different government cadastres where geometry is
> provided by external institutions and institution responsible for
> maintaining the cadastre is adding the attribute values. While they
> can use full feature paste (with attributes) for initial record
> creation, updating requires the possibility to paste geometry only
> without changing any attribute values.
>
>   Thank you
>
> P.S. I am aware of a python plugin for that but it does not work for
> large geometries as clipboard size limit is reached pretty fast on
> windows.
>
> --
> Tomas
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] Unapproved Style in QGIS HUB

2023-11-29 Thread Antonio Locandro via QGIS-Developer
Hi all,

Wondering who is in charge of approving new/update styles in the hub? I had one 
style "aviation" which I updated and now it is no longer visible as it is 
marked pending for review, I uploaded a new version today also trying to 
trigger the review since it has been a bit long.

Probably would be good to have some way to update styles without going through 
a vetting procedure which is good for new styles but a bit cumbersome for 
updates.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Paste geometry functionality

2023-11-29 Thread Régis Haubourg via QGIS-Developer
Oh I get it now, you want to change in place the geometry of a select 
object. I tend to use spatial SQL myself for this kind of stuff as it 
starts to sound like spatial analysis. You can also use the 
geoprocessing toolbox with the "edit in place" flag. But that would not 
be a manual click and point scenario.


What you describe could find its place in advanced digitizing toolbar 
and edit menu as two actions : - "paste as a geometry part" / "paste and 
replace existing geometry".


This way you could add the new geometry, and remove the old one 
afterwards and in the meantime reconciliate eventually the two geometries.


It is already something quite advanced. If you decide to start 
implementing this, I suggest you write a feature request where you 
describe the behavior of this edit tool and play with advanced editing 
options to see how you want it to behave when you have overlapping 
features, etc...


Another way might be to experiment this as a python plugin as a proof of 
concept.


Thanks for raising this!

Régis


On 29/11/2023 16:14, Tomas Straupis wrote:

2023-11-29, tr, 15:53 Régis Haubourg via QGIS-Developer rašė:

Can you be more precise on your use case scenario ?

   Let's say we have a layer L (PostgreSQL/PostGIS) with features A, B
and C with corresponding attribute values set.
   Now some external party sends us a shapefile S with an updated
geometry G which we want to apply to feature B.

   We want to:
   1. Select G in layer S and press Ctrl+C
   2. Select feature B in layer L (layer is in edit mode).
   3. Do "Paste geometry" which should change geometry of feature B but
leave all attribute values intact. This must be an update (not
delete/insert) operation for record B in database table, as database
would usually have different sequences, triggers with business logic
etc.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Paste geometry functionality

2023-11-29 Thread Tomas Straupis via QGIS-Developer
2023-11-29, tr, 15:53 Régis Haubourg via QGIS-Developer rašė:
> Can you be more precise on your use case scenario ?

  Let's say we have a layer L (PostgreSQL/PostGIS) with features A, B
and C with corresponding attribute values set.
  Now some external party sends us a shapefile S with an updated
geometry G which we want to apply to feature B.

  We want to:
  1. Select G in layer S and press Ctrl+C
  2. Select feature B in layer L (layer is in edit mode).
  3. Do "Paste geometry" which should change geometry of feature B but
leave all attribute values intact. This must be an update (not
delete/insert) operation for record B in database table, as database
would usually have different sequences, triggers with business logic
etc.

-- 
Tomas
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Paste geometry functionality

2023-11-29 Thread Régis Haubourg via QGIS-Developer

Hi Tomas,

copy-paste geometric features is implemented for years now, and copying 
to a spreadsheet or text file also.


There is a setting if you don't want the geometry to be pasted as a WKT 
column in text/ spreadsheet format.


The behavior of attribute forms can also be tuned by options regarding 
the attribute of newly created features


Can you be more precise on your use case scenario ?

Regards

Régis

On 28/11/2023 21:37, Tomas Straupis via QGIS-Developer wrote:

Hello

   I was wondering, is there any reason why "paste geometry" (for
vector features) is not implemented in QGIS? Or is it simply because
nobody implemented it (I'm thinking of trying to do that)?

   The use case is different government cadastres where geometry is
provided by external institutions and institution responsible for
maintaining the cadastre is adding the attribute values. While they
can use full feature paste (with attributes) for initial record
creation, updating requires the possibility to paste geometry only
without changing any attribute values.

   Thank you

P.S. I am aware of a python plugin for that but it does not work for
large geometries as clipboard size limit is reached pretty fast on
windows.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer