7
votes
Accepted
How do I merge/dissolve two polygons within one shapefile in QGIS?
It's a little tricky given that the dissolve/union simply extracts separate shapefile. Here is how you could do that:
STEP 1: In the menu item go to: VIEW>TOOLBAR, and then toggle on "Advanced ...
6
votes
Accepted
Display only one label for overlapping points in QGIS
If the geometries of the overlapping points are identical, you can use this expression as the label value:
case
when $id = array_min(array_agg($id, group_by:= $x || ', ' || $y))
then "...
5
votes
Accepted
130 TIF DEM file (total size 3 GB) become 7.4 GB TIF file after merging. Why?
Most times when raster processing output is a lot larger than the raster inputs, the cause is different compression settings. Namely, the input rasters used significantly stronger compression than the ...
4
votes
Accepted
Merging all layers found within File Geodatabase using QGIS
It seems like QGIS has some missing features regarding reading and writing from ESRI FileGeodatabases.
So using the UI to perform what you want seems currently impossible, you can however use the ...
3
votes
QGIS: Set two raster to the same height
If you need to do that just once, a rather simple way is to copy one of the DEM files with gdal_translate by using scaling https://gdal.org/programs/gdal_translate.html#cmdoption-gdal_translate-scale
...
3
votes
Accepted
Merging features with same value in table (CSV)
Solution using the Group Stats Plugin
using the data in the table attached to the question as input data.
3
votes
Merging features with same value in table (CSV)
I add also a simple SQL way, using the great duckdb cli.
Running
duckdb --csv -c "PIVOT (
SELECT
* EXCLUDE (id, Gender)
FROM
read_csv_auto('input.csv')
) ON Category USING SUM(Amount)&...
2
votes
Accepted
Treat overlapping pixel when doing merge GeoTIFF images using Rasterio
The rasterio.merge function has an argument where you can specify the merging method. Availables are:
first: reverse painting
last: paint valid new on top of existing
min: pixel-wise min of existing ...
2
votes
Merging polygons based on distance in QGIS
It is not in QGIS, but if you can run standalone python scripts you could try the (new) dissolve_within_distance feature of geofileops.
It offers a basic subset of features of "aggregate polygons&...
2
votes
Merging layers, then dissolving and keeping all attribute values in QGIS
The solution from @Babel will result in only one feature with 9 columns, if you want to have 3 features with 3 columns and attributes you have to use a union instead:
select * from Layer1
union
select ...
2
votes
Accepted
Merging layers, then dissolving and keeping all attribute values in QGIS
Create a virtual layer with this query and export/save it to make it permanent:
select a, b, c, d, e, f, g, h, i,
st_union(layer1.geometry, st_union(layer2.geometry,layer3.geometry))
from layer1, ...
2
votes
Merging multiple line and point vectors in QGIS 3.28
You dont have to use python.
Modeler
Create a model with a Multiple Input Input. Set Allowed layer type to Line:
When you execute the model only the line layers in your project will be listed, Select ...
2
votes
Merging features with same value in table (CSV)
If the number of Categories are known and not too many (to type in manually in the query), you can create a query layer / virtual layer.
Open the DB Manager and execute the query in the Virtual Layers ...
2
votes
Fill gaps in one high resolution raster with data from another low resolution raster using QGIS
I am able to answer my own question here following a bit of playing around...
I found that a solution was to upsample the low resolution raster from 30m to 5m and then merge. This seems to have done ...
2
votes
Accepted
How to union two polygon shapefiles by one or more attribute fields in QGIS
Given that your two layers presumably have the same attributes, you can just copy and paste:
Edit -> Select -> Select All Features
Edit -> Copy Features (Ctrl-C on Windows)
Switch to other ...
2
votes
How to union two polygon shapefiles by one or more attribute fields in QGIS
You can use SQL with UNION operator. If you can have duplicate records, you should use UNION ALL, or the duplicates are dropped.
SELECT * FROM "LayerA"
UNION
SELECT * from "LayerB"
...
2
votes
Merge multiple histograms into a single table and export as CSV
The error you're getting means that some of the images don't actually have any pixels inside the polygon. The easiest way to deal with that is to do the reduceRegion and just set the result back on ...
2
votes
Accepted
Union of 2+ point datasets with overlapping and non-overlapping lat/lon points
Try this:
Merge the point layers with geoprocessing tool merge vector layers
Buffer the merged layer with a distance that approximates to the furthest separation you expect in a cluster. This will ...
2
votes
Merging two (or more) selected objects in GeoJSON file within QGIS
Merging the two singlepart geometries results multipart geometry. You can change singlepart geometry type to multipart by exporting your layer.
right click on your GeoJSON layer in the Layers list ...
1
vote
Accepted
Why do st_union and dplyr::summarise produce different results, with summarise giving me the object I want?
Firstly, I don't know what version of sf you are using but by doesn't work like that for me (X is a column in my data):
> u = st_union(nc, by="X")
Error in s2::s2_union_agg(x, ...) : ...
1
vote
Accepted
How to merge Landsat data on different paths in R
These images don't need to be reprojected because they fall into different UTM zones. Rwanda falls in 4 zones (35N, 35S, 36N, 36S). See here:
Reprojecting to the wrong UTM zone will forcibly alter ...
1
vote
How to replace bathymetry in a DEM
I just tried using the gdal:merge tool, and it worked. The order in which you add the files is important. This question https://stackoverflow.com/q/75202479 says that it takes the last value that is ...
1
vote
Accepted
QGIS DEM (Raster) merge: errors
Quoting to solution to one of the similar issue: https://gis.stackexchange.com/a/74068/126926 (Quick Summary: You can't write data to a VRT. It's a "Virtual Raster", and is actually just an ...
1
vote
How to speed up ST_Union PostGIS query for complex problem
The ST_ClusterDBSCAN function can be very slow, and may not actually be needed.
A first suggestion that springs to mind is however dependent on the CRS of the geometries and the make-up of the tiles. ...
1
vote
Merging features with same value in table (CSV)
You could start from reshape the CSV.
If the input is in example this
id,Year,Neighbourhood_name,Category,Gender,Amount
1,2019,Emilstorp,0-5 years,Male,15
2,2019,Emilstorp,6-15 years,Female,25
3,2021,...
1
vote
Should I merge SRTM tiles then reproject or reproject each tile then merge?
In most cases you should merge first and then reproject. Otherwise you tend to end up with gaps and overlaps at the tile boundaries.
You can either use the standard Merge tool, or build a VRT (virtual ...
1
vote
Accepted
Connect touching lines by condition using expressions in QGIS
Dissolve with the option Keep disjoint features separate activated.
Get the points where layer A touches layer B, e.g. using overlay_touches().
Split lines of layer A at these points using this ...
1
vote
Accepted
Rasterizing raster layers with style
You can export the project/map canvas as image: go to menu Project > Import/Export > Export Map to Image.... Make appropriate settings for resolution of the output raster an be sure to check the ...
1
vote
Accepted
Merging small polygons with neighbor polygons using GeoPandas and PySAL
I wrote a function once upon a time to solve a similar problem: reclassify_neighbours.
Copy-pasted code, including the documentation that explains how to use the function:
def reclassify_neighbours(
...
1
vote
Merging two adjacent polygons which borders are not touching each other?
As your original question was about an automated/scripted solution... you could try the dissolve_within_distance feature of geofileops.
import logging
import geofileops as gfo
if __name__ == "...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
merge × 1254qgis × 517
arcgis-desktop × 260
raster × 159
shapefile × 123
polygon × 108
arcpy × 94
arcmap × 80
dissolve × 65
line × 63
r × 60
python × 54
gdal × 54
postgis × 41
dem × 41
modelbuilder × 40
layers × 38
attribute-joins × 36
pyqgis × 34
attribute-table × 34
vector × 34
overlapping-features × 34
arcgis-pro × 33
mosaic × 31
geotiff-tiff × 30