On Thursday, 22 September 2016 17:48:35 UTC+2, Stephen Woodbridge wrote:
Hi,
I compute a route and dump the results into a table, then try to recovergeometrycolumn on that table but it fails. I'm guessing the problem is because the first row in the table is the summary row for the route and the geometry is null.
create table route_results as select * from edges_net where NodeFrom=33 and NodeTo=123;
select recovergeometrycolumn('route_table', 'Geometry');
RecoverGeometryColumn(): validation failed
0
This report is correct
- it is a invalid geometry-column
A valid geometry-column MUST have
- the same geometry-type (i.e. not mixed, such as LINESTRING with LINESTRINGZ)
- the same srid (i.e. not mixed, such as -1 with 4326)
select asewkt(Geometry) from route_results where rowid=1;
SRID=-1;LINESTRING()
Assuming that all the geometries should be 4326 (Wsg84)
- then this is the cause of the error
select asewkt(Geometry) from route_results where rowid=3;
SRID=4326;LINESTRING(-10.76069 6.336939999999999,-10.76451 6.33742)
Using Spatialite 4.3.0a on Windows.
I saw a discussion with Jukka about this failing in spatialite_gui, but not sure what version of spatialite the fix was going into.
If that sample (I don't which discussion you mean) is the same as this one
- then it will still fail spatialite_gui because
-- it is a invalid geometry-column
Mark
-Steve