In MSSQL I have LineString in Geometry type.When I try to convert it to geography using :
GEOGRAPHY::STGeomFromText(geom.MakeValid().STUnion(geom.MakeValid().STStartPoint().MakeValid()).STAsText(),4326)I still get error that
Msg 6522, Level 16, State 1, Line 19 A .NET Framework error occurred during execution of user-defined routine or aggregate "geography":System.ArgumentException: 24200: The specified input does not represent a valid geography instance. Use MakeValid to convert the instance to a valid instance. Note that MakeValid may cause the points of a spatial instance to shift slightly.System.ArgumentException: at Microsoft.SqlServer.Types.SqlGeography..ctor(GeoData g, Int32 srid) at Microsoft.SqlServer.Types.SqlGeography.GeographyFromText(OpenGisType type, SqlChars taggedText, Int32 srid)Any idea how I can convert it to geography ?
Any idea how I can share the LineString ? Its very long (exceeding this post body length)
أكثر...
GEOGRAPHY::STGeomFromText(geom.MakeValid().STUnion(geom.MakeValid().STStartPoint().MakeValid()).STAsText(),4326)I still get error that
Msg 6522, Level 16, State 1, Line 19 A .NET Framework error occurred during execution of user-defined routine or aggregate "geography":System.ArgumentException: 24200: The specified input does not represent a valid geography instance. Use MakeValid to convert the instance to a valid instance. Note that MakeValid may cause the points of a spatial instance to shift slightly.System.ArgumentException: at Microsoft.SqlServer.Types.SqlGeography..ctor(GeoData g, Int32 srid) at Microsoft.SqlServer.Types.SqlGeography.GeographyFromText(OpenGisType type, SqlChars taggedText, Int32 srid)Any idea how I can convert it to geography ?
Any idea how I can share the LineString ? Its very long (exceeding this post body length)
أكثر...