Skip to main content

Questions tagged [st-union]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
91 views

Union of vector polygons split on tile boundaries

I have two geopackages - vectorized output from a classification exercise (let's call them tile1.gpkg and tile2.gpkg). These are located on the border between the two tiles like so: Each of these has ...
Momchill's user avatar
  • 294
3 votes
1 answer
82 views

How to speed up ST_Union PostGIS query for complex problem

I'm fairly new to working with PostGIS and have experienced the issue of extremely long runtimes when working on my data. Here's what I'm trying to do: I have an infrastructure dataset that is made up ...
Felix_geospatial's user avatar
3 votes
2 answers
137 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
  • 191
1 vote
2 answers
322 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
372 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
3 votes
2 answers
510 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
  • 857
2 votes
1 answer
98 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
  • 735
3 votes
1 answer
564 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
  • 447
1 vote
1 answer
716 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
1k 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
2k 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
  • 447
2 votes
0 answers
172 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
555 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
  • 10.5k