Skip to main content
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 ...
hillsonghimire's user avatar
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 "...
Matt's user avatar
  • 17.8k
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 ...
Houska's user avatar
  • 8,326
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 ...
Dror Bogin's user avatar
  • 3,565
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 ...
user30184's user avatar
  • 68.1k
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.
pigreco's user avatar
  • 4,510
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)&...
aborruso's user avatar
  • 1,279
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 ...
remi.braun's user avatar
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&...
Pieter's user avatar
  • 3,804
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 ...
eurojam's user avatar
  • 11.7k
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, ...
Babel's user avatar
  • 73.9k
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 ...
Bera's user avatar
  • 76.4k
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 ...
Bera's user avatar
  • 76.4k
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 ...
SHV_la's user avatar
  • 131
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 ...
Tom Brennan's user avatar
  • 5,439
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" ...
Bera's user avatar
  • 76.4k
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 ...
Noel Gorelick's user avatar
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 ...
Aquamarine's user avatar
  • 1,541
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 ...
Zoltan's user avatar
  • 7,430
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, ...) : ...
Spacedman's user avatar
  • 65.6k
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 ...
Kartograaf's user avatar
  • 2,924
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 ...
til_b's user avatar
  • 5,197
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 ...
hillsonghimire's user avatar
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. ...
Paul van der Kroft's user avatar
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,...
aborruso's user avatar
  • 1,279
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 ...
Tom Brennan's user avatar
  • 5,439
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 ...
Babel's user avatar
  • 73.9k
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 ...
Babel's user avatar
  • 73.9k
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( ...
Pieter's user avatar
  • 3,804
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__ == "...
Pieter's user avatar
  • 3,804

Only top scored, non community-wiki answers of a minimum length are eligible