Questions tagged [st-union]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
2 answers
76 views

How to Append a POINT to a MULTIPOINT column

I have a table in postgresql that includes a geometry(MultiPoint,4326) column. I want to run a process that appends a new MULTIPOINT(4.49306 52.26167) to this column. I am currently doing this: UPDATE ...
bcsta's user avatar
  • 161
1 vote
2 answers
149 views

PostGIS ST_Union using array of geometries

I'm new to PostGIS and I have a set of layers that need to be merged and dissolved. I have no problem doing this for 2 input layers using ST_Union(geometry g1, geometry g2), but for more than 2 layers,...
chrisp66's user avatar
1 vote
1 answer
207 views

Dissolve/Union large number (1.2m ) polygons in PostGIS

I am very new to PostGIS. I read that it should work faster than QGIS, so I thought I'd give it a go. I want to completely dissolve a shapefile of 1.2m polygons in the same way as QGIS built in ...
Melanie Baker's user avatar
0 votes
0 answers
37 views

Visualise results from STUnion in SQL-Server 2008 R2

I have an SQL table which contains the buffers polygons of points. These buffers should now be aggregated any displayed as a single Polygon/Multipolygon. With the following command I think I can do a ...
Robert Buckley's user avatar
3 votes
2 answers
351 views

using st_collect vs st_union to calculate centroids

Here is my code: SELECT cluster_id, st_centroid(st_union(points_geom)) as cluster_centroid FROM clustering GROUP by cluster_id Should I replace st_union with st_collect? Because the coordinates for ...
analyst92's user avatar
  • 839
2 votes
1 answer
63 views

Postgis dissolve boundaries and calculate mean values

I like to combine two layers and calculate/summarize data from one to another. So, I have values for the subtypes (yellow lines) and the area of the subtypes. Now I like to calculate a mean value for ...
oppia04's user avatar
  • 725
3 votes
1 answer
376 views

How do I optimize a spatial query in PostGIS

I'm trying to speed up my query which should return only these polygons that are not completly overlapped by polygons above them. My tables looks like this: Map -> Layer -> Object The object ...
BR75's user avatar
  • 437
1 vote
1 answer
425 views

ST_Union in Apache Sedona

I'm trying to merge some polygons with ST_Union using Apache Sedona on a databricks cluster. %sql SELECT Polygon_Name ,ST_Union(Polygon_Boundary) AS Polygon2_Boundary FROM tbl_polygon GROUP BY ...
James Lockyer's user avatar
5 votes
1 answer
902 views

Unsplitting/merging lines that have coincident endpoints using PostGIS

I have a large dataset of lines/linestrings (ie. a road network), which is unregularly segmentised/ split and the lines needs to be merged at coincident endpoints (if only two lines are touching). I'd ...
krenz's user avatar
  • 163
5 votes
1 answer
1k views

Counting geometries which intersect another geometry using PostGIS

I'm trying to calculate the total area for each layer I have within a specific area and count the geometries which intersects with that specific area. I can calculate the area and the results seem ...
BR75's user avatar
  • 437
2 votes
0 answers
153 views

Virtual layers w/ spatial query not working as before (3.18.1 vs 3.20.3)

I have a set of maps that intensively utilizes virtual layers, but last week our boss updated from QGis 3.10/3.18 to 3.20.3 in all PCs, and now the layers are not loading. Normally they would refresh ...
Opazo's user avatar
  • 363
0 votes
1 answer
463 views

Using ST_Union to aggregate polygon parts resulting of ST_SubDivide leads to a GEOS TopologyException

Follow up on this topic: Optimizing an intersection between a single massive multipolygon (WKT) and many features from PostGIS I noticed I have to run an ANALYZE (not VACUUM ANALYZE!) on the table for ...
swiss_knight's user avatar
  • 9,776