0

I am working on a project in SpatiaLite and I would like to join together two geometries to create one final geometry that contains both original polygons (Ex. Putting together two Legos). The tricky part is how to make this work in SpatiaLite with the 'Blob' geometry type. I have tried ST_Union but still cannot seem to get any result at all. The result of this will ultimately update a geometry in a table elsewhere.

Here's what I've done so far:

UPDATE table1 
SET Shape = (
SELECT ST_Union (a.Shape, b.Shape)
FROM table2 as a
JOIN (
table3 as b
ON a.Shape = b.Shape)
WHERE a.ADDRESS = "" or b.ADDRESS = "");

I realize there are many errors in the syntax of this, I am only just getting used to SQLite and the sytanx versus that of Postgres. Please feel free to make edits.

Pang
  • 9,564
  • 146
  • 81
  • 122
Julia
  • 1
  • 1
  • Your description does not make clear how to find the original geometries, and what to do with the result. Please provide some sample data and your desired output. – CL. Jun 14 '17 at 08:52
  • The original geometries are found by search the addresses with the WHERE clause at the end. Sample output would resemble just the union geometry that could then be inserted into another table. Sorry for the ambiguity, this is my first question. – Julia Jun 14 '17 at 12:15
  • In its current form, the query *does not make sense*. It is not possible to deduce what you want without sample data. (You don't need to show geometries.) – CL. Jun 14 '17 at 18:39

0 Answers0