I get the same kind of commit errors when I change geometry for any of my SQL 
Spatial feature classes. I have traced the error back to the following error 
message in QGIS (version 2.16.2):



A .NET Framework error occurred during execution of user-defined routine or 
aggregate "geometry": System.FormatException: 24114: The label PointZ 
(1994269.8154 in the input well-known text (WKT) is not valid. Valid labels are 
POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, 
GEOMETRYCOLLECTION, CIRCULARSTRING, COMPOUNDCURVE, CURVEPOLYGON and FULLGLOBE 
(geography Data Type only). System.FormatException: at 
Microsoft.SqlServer.Types.OpenGisTypes.ParseLabel(String input) at 
Microsoft.SqlServer.Types.WellKnownTextReader.ParseTaggedText(OpenGisType type) 
at Microsoft.SqlServer.Types.WellKnownTextReader.Read(OpenGisType type, Int32 
srid) at Microsoft.SqlServer.Types.SqlGeometry.GeometryFromText(OpenGisType 
type, SqlChars text, Int32 srid) . [Microsoft][ODBC SQL Server Driver][SQL 
Server]The statement has been terminated. QODBC3: Unable to execute statement.



My original geometry type is Point, and SQL Server does not recognize PointZ as 
a geometry type. This tells me that QGIS might be attempting a geometry move in 
SQL Server by updating the geometry field to the coordinates I move to, but 
writing a PointZ type. I am not sure if it attempts the same kind of thing for 
Linestring types (changing to LinestringZ for example).



I have this as an open question on GIS Stack Exchange: "Cannot commit simple 
edit actions (move or change node) in MSSQL feature class in QGIS". I am hoping 
a seasoned Python/QGIS developer can take a look at this, because I wouldn't 
mind using QGIS regularly for editing features in my enterprise database (in 
SQL Server).





-----Original Message-----
From: qgis-user-requ...@lists.osgeo.org 
[mailto:qgis-user-requ...@lists.osgeo.org]
Sent: Thursday, September 15, 2016 5:31 AM
To: qgis-user@lists.osgeo.org
Subject: Qgis-user Digest, Vol 127, Issue 41



Send Qgis-user mailing list submissions to

      qgis-user@lists.osgeo.org<mailto:qgis-user@lists.osgeo.org>



To subscribe or unsubscribe via the World Wide Web, visit

      http://lists.osgeo.org/mailman/listinfo/qgis-user

or, via email, send a message with subject or body 'help' to

      
qgis-user-requ...@lists.osgeo.org<mailto:qgis-user-requ...@lists.osgeo.org>



You can reach the person managing the list at

      qgis-user-ow...@lists.osgeo.org<mailto:qgis-user-ow...@lists.osgeo.org>



When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Qgis-user digest..."



------



Message: 2

Date: Thu, 15 Sep 2016 11:14:19 +1000

From: Johanna Botman 
<johanna.bot...@griffith.nsw.gov.au<mailto:johanna.bot...@griffith.nsw.gov.au>>

To: James Wood <jwood...@gmail.com<mailto:jwood...@gmail.com>>,      
qgis-user@lists.osgeo.org<mailto:qgis-user@lists.osgeo.org>

Subject: Re: [Qgis-user] Fail to commit changes to SQL database

Message-ID:

      
<of0f6f8398.671c32bf-onca25802f.0006a366-ca25802f.0006c...@griffith.nsw.gov.au<mailto:of0f6f8398.671c32bf-onca25802f.0006a366-ca25802f.0006c...@griffith.nsw.gov.au>>



Content-Type: text/plain; charset="utf-8"



Thanks James,



We are using SQL 2014 SP2. I don't know if we are using ST_Geometry. I have 
asked our consultant and he has not got back to me yet.



_______________

Johanna Botman

GIS / Assets Officer





Griffith City Council

Ph: 02 6962 8168



James Wood <jwood...@gmail.com<mailto:jwood...@gmail.com>> wrote on 15/09/2016 
12:43:31 AM:



> From: James Wood <jwood...@gmail.com<mailto:jwood...@gmail.com>>

> To: Johanna Botman 
> <johanna.bot...@griffith.nsw.gov.au<mailto:johanna.bot...@griffith.nsw.gov.au>>

> Cc: qgis-user@lists.osgeo.org<mailto:qgis-user@lists.osgeo.org>

> Date: 15/09/2016 12:43 AM

> Subject: Re: [Qgis-user] Fail to commit changes to SQL database

>

> I have seen similar behavior with SQL Server 2012, so I would be

> interested to hear from the user community as well.

>

> Johanna,

> What version of SQL and is this SQL Spatial (ST Geometry)?

>

> Thanks,

> James

> Sent from my iPhone

>

> On Sep 13, 2016, at 22:42, Johanna Botman

<johanna.bot...@griffith.nsw.gov.au

> > wrote:



> I'm working on a [road] line layer and changing the geometry so that

> it matches the aerial image. I can make some changes and save them,

> but then suddenly I can't save anymore changes.

> In the yellow line at the top of the canvas it says Commit Errors:

> Could not commit changes to layer [road]. When I click the 'show more'

> it simply says 'Errors: ERROR: [x] geometries not changed'

>

> I can shut QGIS down and restart it. Then I still cannot change that

> last geometry that caused the issue, but I can change others until I

> get that message again. I have rebooted my machine and I made a little

> more progress but still come up against the error.

>

> My research in stack exchange yielded nothing in relation to SQL

> server, but I asked our IT to have a look at the logs anyway. They

> said there was nothing in the SQL logs either.

>

> I am using QGIS 2.14.4 and this particular table is on a SQL server.

>

> Any ideas?

> _______________

> Johanna Botman

> GIS / Assets Officer

>

> Griffith City Council

> Ph: 02 6962 8168

>

>

Please consider the environment before printing this email notice.



--------------------------------------------------------------------

This e-mail, together with any attachments, is for the exclusive and 
confidential use of the addressee(s). Confidentiality is not waived if you are 
not the intended recipient. Any other distribution, use of, or reproduction 
without prior written consent is strictly prohibited.

Views expressed in this e-mail are those of the individual, except where 
specifically stated otherwise. If this e-mail has been sent to you in error, 
please delete the e-mail completely and immediately from your system. Although 
reasonable precautions are taken, Griffith City Council does not warrant or 
guarantee this message to be free of errors, interference, viruses or similar 
malicious code and does not accept liability for any consequences to the 
recipient opening or using this email or attachments.

This email was scanned and cleared by MailMarshal, Sophos and Kaspersky AV

---------------------------------------------------------------------

-------------- next part --------------

An HTML attachment was scrubbed...

URL: 
<http://lists.osgeo.org/pipermail/qgis-user/attachments/20160915/c9440b3a/attachment-0001.html>



------------------------------


_______________________________________________
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

Reply via email to