The green points, buffered by one of the point attributes, should result in the three areas outlined in red (a table with three rows):
How can I do this with SpatiaLite?
If it's not possible, is there any other way to do this in QGIS?
Here is a step-wise process. Queries were made with Spatialite-gui and visualizations with OpenJUMP.
Take some points into table "points" with an attribute "radius".
Buffer points by taking the radius from an attribute with SQL
CREATE TABLE "buffers" AS
SELECT ST_Buffer("geometry", "radius") as geometry FROM points;
Union the buffer areas with SQL
CREATE TABLE "combined" AS
SELECT ST_Union(geometry) as geometry FROM buffers;
Union is one big multipolygon at this stage. Split it to three distinct geometries with SQL
SELECT ElementaryGeometries('combined', 'geometry', 'elements', 'ID', 'poly_ID');
Have a look at the new table "elements"
The result is close to your sketch, isn't it?
Note: You must execute some additional SQL statements or use the tools of the spatialite-gui besides the ones I have written for registering the geometry columns of the interim tables. I hope my answer is complete enough for a proof of concept.
You can write ST_Union and ST_Buffer into same SQL but it is necessary to create a physical table "combined" and register it into geometry_columns for making ElementaryGeometries function to work.
ElementaryGeometries
is empty (those observations might be related)
Commented
May 3, 2016 at 7:40
SELECT ST_AsText(ST_Union(ST_GeomFromText( 'POLYGON (( 320 320, 320 400, 380 400, 380 320, 320 320 ))'),ST_GeomFromText(' POLYGON (( 340 280, 340 360, 400 360, 400 280, 340 280 ))')))
I get POLYGON (( 320 320, 320 400, 380 400, 380 360, 400 360, 400 280, 340 280, 340 320, 320 320 ))
from Spatialite and also from PostGIS with the same query.
Commented
May 3, 2016 at 9:10
ElementaryGeometries
will always create a new table, wouldn't it?
Commented
May 3, 2016 at 9:42
In QGIS you'd use the merge shapefiles function, just be sure to choose the correct couples/triplets/whatever. From the program menu, Vector -> Data management tools -> merge shapefiles
You could to use Dissolve Tool
But, perhaps you could to create a buffer using the parameter:
In SQL, it is an aggregation query. You can do something like:
Select st_Union(geom) from your_table group by the_attribute_which_make_each_group
ST_Buffer(geometry, radius)
?