1

I have two tables I am joining: 1 spatial (Table 1) and one not spatial (Table 2).

Table 1 looks like this:

| ID | geometry |

Table 2:

| ID | ... |

When I perform the query:

CREATE TABLE AS SELECT * FROM t1, t2 WHERE t1.ID = t2.ID;

I get a table with the geometry column included. But unfortunately it is no longer recognized as a spatial table (spatialite_gui at least). Also, this mean I can't do what I really want to do, which is dump the table as shapefile.

So my question is: Why is the new table not recognised as a spatial table with a geometry column?

1
  • Could you list the column names of both tables?
    – ike
    Commented Mar 27, 2014 at 15:26

1 Answer 1

2

Run:

SELECT RecoverGeometryColumn(<new table>, <geom column name>, <SRID>, <geom type>);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.