I have a table of WKB HexString values, of the form:
in a column called 'Centroid' in spatialite
I want to create a geometry from these values. When I run:
I get a valid geometry. However, if I run:
select GeomFromWKB('x'||"'"||Centroid||"'") from table;
I get invalid geometries. It seems that it is impossible to insert these hex values as binary values. I think may be due to Sqlite thinking that the bracked value in the second statement is a string literal and not being able to transform it into a blob/binary literal.
Does anyone have any solutions either within spatialite itself or using a third party library in python or something?
Note that I have also tried:
select GeomFromEWKB(Centroid) from table;
I seem to recall doing this successfully before in PostGIS, but I'd rather use spatialite if possible.