I imported a csv file containing spatial domain information in varchar, and then converted the varchar (max) values ββto varbinary (max), adding the β0xβ values ββto varchar (max) before the conversion. By then, besides the β0xβ at the beginning, the data in the varbinary (max) column looks exactly like varchar (max) converted to text.
Now I run the following script:
select geometry::STGeomCollFromWKB(wkb, 4326) from dbo.MyTable
where WKB is a varbinary (max) column. Executing the above script causes this error: "Significant binary (WKB) input is invalid"
The data source is the Open Street Map, so no doubt they are the correct area data. Therefore, I assume that there should be something wrong with what I am doing, or I am missing a point for converting WKB to a geometry data type.
Can anyone help?
source
share