Bug #71869 Unable to read geometry column when it has been set with a SRID value.
Description:
Error:
24114: The label SRID=4326;POINT(51.5 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).
Stack:
[FormatException: 24114: The label SRID=4326;POINT(51.5 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).]
Microsoft.SqlServer.Types.OpenGisTypes.ParseLabel(String input) +326
Microsoft.SqlServer.Types.WellKnownTextReader.ParseTaggedText(OpenGisType type) +99
Microsoft.SqlServer.Types.WellKnownTextReader.Read(OpenGisType type, Int32 srid) +47
Microsoft.SqlServer.Types.SqlGeometry.GeometryFromText(OpenGisType type, SqlChars text, Int32 srid) +485
Microsoft.SqlServer.Types.SqlGeometry.Parse(SqlString s) +222
How to repeat:
Create a geometry column in a table, and write to it using either TSQL, or generate the data in C#:
object.geo = DbGeometry.FromText(string.Format("POINT({0} {1})", 51.5 /* LON /*, -1.28 /* LAT * /), 4326)
or
UPDATE table SET geo = GeomFromText(CONCAT('POINT(',lon,' ',lat,')'),4326);
Next, read that data back out again.
The C# class has a DbGeometry property (named geo in this example)
Suggested fix:
If SRID is omitted when saving the value, the connector works, but then the units calculated for distance are 'unreliable', as in, there is no documentation to indicate what units they are, and they don't match up when known distances are compared.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.042 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: Error: 24114: The label SRID=4326;POINT(51.5 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). Stack: [FormatException: 24114: The label SRID=4326;POINT(51.5 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).] Microsoft.SqlServer.Types.OpenGisTypes.ParseLabel(String input) +326 Microsoft.SqlServer.Types.WellKnownTextReader.ParseTaggedText(OpenGisType type) +99 Microsoft.SqlServer.Types.WellKnownTextReader.Read(OpenGisType type, Int32 srid) +47 Microsoft.SqlServer.Types.SqlGeometry.GeometryFromText(OpenGisType type, SqlChars text, Int32 srid) +485 Microsoft.SqlServer.Types.SqlGeometry.Parse(SqlString s) +222 How to repeat: Create a geometry column in a table, and write to it using either TSQL, or generate the data in C#: object.geo = DbGeometry.FromText(string.Format("POINT({0} {1})", 51.5 /* LON /*, -1.28 /* LAT * /), 4326) or UPDATE table SET geo = GeomFromText(CONCAT('POINT(',lon,' ',lat,')'),4326); Next, read that data back out again. The C# class has a DbGeometry property (named geo in this example) Suggested fix: If SRID is omitted when saving the value, the connector works, but then the units calculated for distance are 'unreliable', as in, there is no documentation to indicate what units they are, and they don't match up when known distances are compared.