Re: [Qgis-user] Splitting Spatialite layers

2016-12-11 Thread Nyall Dawson
On 12 Dec 2016 13:14, "Ramon AndiƱach"  wrote:

Ah. Thanks.

Can I echo Richard's request for a back port?


A backport of 3.0s fix isn't possible (it's part of a larger set of
changes). Maybe an alternative fix could be developed for 2.x, but I'm not
aware of anyone actively working on this.

Nyall


-ramon.

On 12 Dec. 2016, at 09:46, Randal Hale 
wrote:

You're hitting a bug that exists in QGIS 2.16 and 2.18 - They are working
on a resolution.

See Below:

http://hub.qgis.org/issues/15847

On 12/11/2016 08:39 PM, custard wrote:

Hi All,

As a  mostly shape/tab file user, I've been attempting to experiment with
spatialite dbs a bit recently, and am starting to get a bit more used to
them. I'm hitting a problem with splitting objects though, and wondered if
this annoyance counted as a bug?

If I have a spatialite layer and split an object, that's fine. But when I
save the layer I get a "Could not commit changes to layer LayerName"
banner. If I press "Show more" then I get something like this:
_

Could not commit changes to layer layername


Errors: SUCCESS: 1 geometries were changed.

SUCCESS: 1 attribute value(s) changed.

ERROR: 4 feature(s) not added.

Provider errors:

SQLite error: UNIQUE constraint failed: LayerName.pkuid

SQL: INSERT INTO "layername"("geometry","pkuid"
,"Code","Lith","Description","Quality","code1","lith1","description1","quality1")
VALUES (ST_Multi(GeomFromWKB(?, 28351)),?,?,?,?,?,?,?,?,?)




I'm not populaing the pkuid data, so I think QGIS is auto filling this.

I think that what's happening is that when QGIS splits the feature both new
parts have the same pkuid number. Certainly if I go in manually and change
the field I can save without errors.

If QGIS is auto filling this column, ought it not be handling the splitting
case too?


Thoughts?

-ramon.


___
Qgis-user mailing listqgis-u...@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user


-- 

Randal Hale
North River Geographic Systems,
Inchttp://www.northrivergeographic.com423.653.3611 <(423)%20653-3611>
rjh...@northrivergeographic.com
twitter:rjhale
http://about.me/rjhalehttp://www.northrivergeographic.com/introduction-to-quantum-gishttps://www.facebook.com/NRGSInc


___
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] Splitting Spatialite layers

2016-12-11 Thread Ramon AndiƱach
Ah. Thanks.

Can I echo Richard's request for a back port?

-ramon.

> On 12 Dec. 2016, at 09:46, Randal Hale  
> wrote:
> 
> You're hitting a bug that exists in QGIS 2.16 and 2.18 - They are working on 
> a resolution. 
> See Below: 
> http://hub.qgis.org/issues/15847
> 
> 
>> On 12/11/2016 08:39 PM, custard wrote:
>> Hi All,
>> 
>> As a  mostly shape/tab file user, I've been attempting to experiment with 
>> spatialite dbs a bit recently, and am starting to get a bit more used to 
>> them. I'm hitting a problem with splitting objects though, and wondered if 
>> this annoyance counted as a bug?
>> 
>> If I have a spatialite layer and split an object, that's fine. But when I 
>> save the layer I get a "Could not commit changes to layer LayerName" banner. 
>> If I press "Show more" then I get something like this:
>> _
>> Could not commit changes to layer layername
>> 
>> Errors: SUCCESS: 1 geometries were changed.
>> SUCCESS: 1 attribute value(s) changed.
>> ERROR: 4 feature(s) not added.
>> Provider errors:
>> SQLite error: UNIQUE constraint failed: LayerName.pkuid
>> SQL: INSERT INTO 
>> "layername"("geometry","pkuid","Code","Lith","Description","Quality","code1","lith1","description1","quality1")
>>  VALUES (ST_Multi(GeomFromWKB(?, 28351)),?,?,?,?,?,?,?,?,?)
>> 
>> 
>> I'm not populaing the pkuid data, so I think QGIS is auto filling this.
>> I think that what's happening is that when QGIS splits the feature both new 
>> parts have the same pkuid number. Certainly if I go in manually and change 
>> the field I can save without errors.
>> If QGIS is auto filling this column, ought it not be handling the splitting 
>> case too?
>> 
>> Thoughts?
>> -ramon.
>> 
>> 
>> ___
>> 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
> 
> -- 
> 
> Randal Hale
> North River Geographic Systems, Inc
> http://www.northrivergeographic.com
> 423.653.3611 rjh...@northrivergeographic.com
> twitter:rjhale http://about.me/rjhale
> http://www.northrivergeographic.com/introduction-to-quantum-gis
> https://www.facebook.com/NRGSInc
___
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] Splitting Spatialite layers

2016-12-11 Thread Randal Hale
You're hitting a bug that exists in QGIS 2.16 and 2.18 - They are 
working on a resolution.


See Below:

http://hub.qgis.org/issues/15847


On 12/11/2016 08:39 PM, custard wrote:

Hi All,

As a  mostly shape/tab file user, I've been attempting to experiment 
with spatialite dbs a bit recently, and am starting to get a bit more 
used to them. I'm hitting a problem with splitting objects though, and 
wondered if this annoyance counted as a bug?


If I have a spatialite layer and split an object, that's fine. But 
when I save the layer I get a "Could not commit changes to layer 
LayerName" banner. If I press "Show more" then I get something like this:

_

Could not commit changes to layer layername


Errors: SUCCESS: 1 geometries were changed.

SUCCESS: 1 attribute value(s) changed.

ERROR: 4 feature(s) not added.

Provider errors:

SQLite error: UNIQUE constraint failed: LayerName.pkuid

SQL: INSERT INTO 
"layername"("geometry","pkuid","Code","Lith","Description","Quality","code1","lith1","description1","quality1") 
VALUES (ST_Multi(GeomFromWKB(?, 28351)),?,?,?,?,?,?,?,?,?)





I'm not populaing the pkuid data, so I think QGIS is auto filling this.

I think that what's happening is that when QGIS splits the feature 
both new parts have the same pkuid number. Certainly if I go in 
manually and change the field I can save without errors.


If QGIS is auto filling this column, ought it not be handling the 
splitting case too?



Thoughts?

-ramon.



___
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


--

Randal Hale
North River Geographic Systems, Inc
http://www.northrivergeographic.com
423.653.3611 rjh...@northrivergeographic.com
twitter:rjhale http://about.me/rjhale
http://www.northrivergeographic.com/introduction-to-quantum-gis
https://www.facebook.com/NRGSInc

___
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