Re: [Qgis-user] Split features using Geopackage layer?
Ah that’s fine thank you Andreas and Even. Chris From: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of Neumann, Andreas Sent: 19 October 2016 13:55 To: Even Rouault Cc: qgis-user@lists.osgeo.org Subject: Re: [Qgis-user] Split features using Geopackage layer? As far as I know, Nyall Dawson is currently working on fixing this, as part of his work on unique value constraints (provider provided or qgis provided where the provider doesn't support it). But not sure about the details. Certainly, PostgreSQL and Geopackage are top priorities for that. And his work targets QGIS 3.x, not for 2.x Greetings, Andreas On 2016-10-19 14:43, Even Rouault wrote: Le mercredi 19 octobre 2016 14:14:40, Chris Buckmaster a écrit : Hi I have a geopackage polygon layer and I am trying to split a simple feature within it. When I try to do it, I get an error message 'failed to insert, UNIQUE constraint failed'. Is this a known issue with splitting features using the geopackage format, it could it be how the layer is set up? No, it is due to the fact that when splitting the feature, the newly created feature receives the same 'fid' value (the first column in the attribute table) as the other part, and that when creating the feature, the fid, when set, is honoured. Hence given the duplication of fid, the failure. Before saving the edits, you can manually unset the fid. Although something should probably be done either in the splitting tool to unset the fid column of the new feature. Or perhaps the provider could be made more tolerant in the case of duplicated FID to assign a new one. This could happen for other formats handled by OGR like spatialite (if not going throug the QGIS spatialite provider), FileGDB, etc... Would probably deserve a ticket in the bug tracker. Even ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Split features using Geopackage layer?
On 19 October 2016 at 22:55, Neumann, Andreas wrote: > As far as I know, Nyall Dawson is currently working on fixing this, as part > of his work on unique value constraints (provider provided or qgis provided > where the provider doesn't support it). But not sure about the details. > Certainly, PostgreSQL and Geopackage are top priorities for that. And his > work targets QGIS 3.x, not for 2.x Yes, I'm currently working on this as part of a larger work in auto-exposing provider side constraints (not null/unique) to QGIS's form validation. WIP is here: https://github.com/nyalldawson/QGIS/commits/constraints, but so far it only handles the detection + translation of constraints from provider -> QGIS. The form based/tool changes are still to come. Nyall > > Greetings, > > Andreas > > > > On 2016-10-19 14:43, Even Rouault wrote: > > Le mercredi 19 octobre 2016 14:14:40, Chris Buckmaster a écrit : > > Hi > > I have a geopackage polygon layer and I am trying to split a simple feature > within it. > > When I try to do it, I get an error message 'failed to insert, UNIQUE > constraint failed'. > > Is this a known issue with splitting features using the geopackage format, > it could it be how the layer is set up? > > > No, it is due to the fact that when splitting the feature, the newly created > feature receives the same 'fid' value (the first column in the attribute > table) > as the other part, and that when creating the feature, the fid, when set, is > honoured. Hence given the duplication of fid, the failure. Before saving the > edits, you can manually unset the fid. > > Although something should probably be done either in the splitting tool to > unset the fid column of the new feature. Or perhaps the provider could be > made > more tolerant in the case of duplicated FID to assign a new one. > > This could happen for other formats handled by OGR like spatialite (if not > going throug the QGIS spatialite provider), FileGDB, etc... > > Would probably deserve a ticket in the bug tracker. > > Even > > > > > > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Split features using Geopackage layer?
As far as I know, Nyall Dawson is currently working on fixing this, as part of his work on unique value constraints (provider provided or qgis provided where the provider doesn't support it). But not sure about the details. Certainly, PostgreSQL and Geopackage are top priorities for that. And his work targets QGIS 3.x, not for 2.x Greetings, Andreas On 2016-10-19 14:43, Even Rouault wrote: > Le mercredi 19 octobre 2016 14:14:40, Chris Buckmaster a écrit : > >> Hi >> >> I have a geopackage polygon layer and I am trying to split a simple feature >> within it. >> >> When I try to do it, I get an error message 'failed to insert, UNIQUE >> constraint failed'. >> >> Is this a known issue with splitting features using the geopackage format, >> it could it be how the layer is set up? > > No, it is due to the fact that when splitting the feature, the newly created > feature receives the same 'fid' value (the first column in the attribute > table) > as the other part, and that when creating the feature, the fid, when set, is > honoured. Hence given the duplication of fid, the failure. Before saving the > edits, you can manually unset the fid. > > Although something should probably be done either in the splitting tool to > unset the fid column of the new feature. Or perhaps the provider could be > made > more tolerant in the case of duplicated FID to assign a new one. > > This could happen for other formats handled by OGR like spatialite (if not > going throug the QGIS spatialite provider), FileGDB, etc... > > Would probably deserve a ticket in the bug tracker. > > Even ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Split features using Geopackage layer?
Le mercredi 19 octobre 2016 14:14:40, Chris Buckmaster a écrit : > Hi > > I have a geopackage polygon layer and I am trying to split a simple feature > within it. > > When I try to do it, I get an error message 'failed to insert, UNIQUE > constraint failed'. > > Is this a known issue with splitting features using the geopackage format, > it could it be how the layer is set up? No, it is due to the fact that when splitting the feature, the newly created feature receives the same 'fid' value (the first column in the attribute table) as the other part, and that when creating the feature, the fid, when set, is honoured. Hence given the duplication of fid, the failure. Before saving the edits, you can manually unset the fid. Although something should probably be done either in the splitting tool to unset the fid column of the new feature. Or perhaps the provider could be made more tolerant in the case of duplicated FID to assign a new one. This could happen for other formats handled by OGR like spatialite (if not going throug the QGIS spatialite provider), FileGDB, etc... Would probably deserve a ticket in the bug tracker. Even -- Spatialys - Geospatial professional services http://www.spatialys.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Split features using Geopackage layer?
Hi I have a geopackage polygon layer and I am trying to split a simple feature within it. When I try to do it, I get an error message 'failed to insert, UNIQUE constraint failed'. Is this a known issue with splitting features using the geopackage format, it could it be how the layer is set up? Thanks, Chris ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user