Spatialite RecoverGeometryColumn

153
0
02-15-2021 01:39 PM
Labels (1)
karosc
by
New Contributor

 

I am trying to create a spatial table from a view in my spatialite database and found a quirk in Arcmap and ArcGIS Pro I am wondering if anyone has come across. 

 

ArcGIS has no problem recognizing my spatial table if I create my table, add my geometry column, then insert data a la: 

CREATE TABLE spatial_table(
OBJECTID INT,
FIELD1 TEST
FIELD2 INT
);

SELECT AddGeometryColumn('spatial_table', 'shape', 4326, 'multipolygon', 'XY');

Insert into spatial_table select * from spatial_view;

 

However ArcGIS does not recognize the table's spatial data if I elect for a more concise SQL syntax, creating my table including my spatial column, then trying to register the geometry column a la:

CREATE TABLE spatial_table as 
SELECT * from spatial view;
SELECT RecoverGeometryColumn('spatial_table', 'shape', 4326, 'multipolygon', 'XY');

 

I can add this table to ArcMap or ArcGIS pro, but the spatial reference and spatial column are not recognized. This seems weird to me because the spatiallite docs states that there is absolutely no difference between a Geometry created by AddGeometryColumn() and another crea...

Tags (1)
0 Kudos
0 Replies