I have polygon table called "tableA" with 72000 records. It has a geometry column called "geometry", and a text column called "field1". I want to aggregate\dissolve all polygons with the same "field1" value.
I have a Spatial Index in Geometry and an index in field1.
I tried this:
Select f.field1 as field1, st_union(f.geometry) as geometry
From tableA as f
Group by field1;
and its taking too long, I had to cancel it after being processing for 1 hour. Using Arcgis it toke me 5 minutes, so I must be doing something wrong.
So, is there a better way to preform this operation using spatialite? Is the Spatial Index being used this way?
The question is also in gis.stackexchange if anyone care to answer there.
Thank You very much.
Alexandre Neto
CREATE TABLE GAUL_1 AS
SELECT
STATUS,
DISP_AREA,
ADM2_CODE,
ADM2_NAME,
STR2_YEAR,
EXP2_YEAR,
ADM1_CODE,
ADM1_NAME,
ADM0_CODE,
ADM0_NAME,
ST_unaryunion(ST_collect(Geometry)) AS Geometry
FROM GAUL1990_2
GROUP BY ADM2_CODE;
count GeometryType SRID Dimension
411 MULTIPOLYGON 4326 XY
576 POLYGON 4326 XY