8
votes
Joining dangling end in the vector layer using QGIS
You can use "Snap Vertices to Nearest Points by Condition" Processing tool from ProcessX PlugIn.
It is made for this purpose. Before running it, just extract the vertices of your lines via &...
7
votes
Accepted
How to merge lines with close coordinates into one line in PostGIS?
It depends on what you want with the line. For example, do you want it to have the same length as the longest line, or the shortest line?
One approximation: take the convex hull of your lines (a ...
7
votes
Merging Vector Layers using PyQGIS
iface.activeLayer() returns only the last layer clicked. It is also not subscriptable which is why, I assume, you are getting the error.
To merge all selected layers in the layer tree you can do this:
...
6
votes
Importing squares indicated through EPSG:3035 into QGIS and merge with shapefiles
In Excel,
Add two empty columns next to Gitter-ID.
Split Gitter-ID text into different column with "Data > Text to Column". Use firstly N, then E as separator/delimiter. Enter Y and X ...
6
votes
Accepted
Importing squares indicated through EPSG:3035 into QGIS and merge with shapefiles
You are correct, Gitter-ID are CRS3035 coordinates.
To use them in QGIS, first create columns with the N & E parts of the coordinates (split column by width in Excel), and export that Excel sheet ...
5
votes
Accepted
QGIS Raster Merge - Change in the band values problem
By default, QGIS shows estimated min and max values in the layer legend (faster). To see the actual values, in the raster layer properties, symbology tab, change "Accuracy" from "...
5
votes
Create one continuous polygon from many polygons with holes in QGIS
You can use the Dissolve tool. It will add all polygons to a single one while maintaining the gaps.
4
votes
Accepted
Passing output of the processing tool to QgsVectorFileWriter using PyQGIS
The issue here is that when you call the processing.runAndLoadResults() method, the 'OUTPUT' value returned is a layer id string (as opposed to calling processing.run() which returns a QgsVectorLayer ...
4
votes
Accepted
How to merge GeoTIFF files of different resolutions and utilize the higher resolution tile data where available
One potential solution is to use a VRT. You can create one of these with GDAL. A VRT is a virtual dataset, a sort of blueprint/instruction for an image without actually doing the processing, so no ...
4
votes
Joining dangling end in the vector layer using QGIS
Extract start- and end-points of the lines using Menu Processing > Toolbox > Geometry by expression with this expression: union (start_point ($geometry), end_point($geometry)), then run ...
3
votes
Accepted
How to merge raster classes using the raster calculator?
the following raster calculator expression reclassifies the raster:
if ( "my_raster@1" <= 6, 1,"my_raster@1")
all values <= 6 will have the value 1, the others remain ...
3
votes
Accepted
How to create one raster layer from two raster layers in which priority is given to one of the raster layers' values (the smaller in extent)
The problem are the "no data" values! Try the following:
Replace the "no data" values by e.g. -9999 with the tool "Fill NoData cells" from the toolbox
Use the raster ...
2
votes
Accepted
What is the effect of using -update when merging GeoJSONs with ogr2ogr?
EDIT: The ogr2ogr option -update has no effect when it is used together with -append. The GDAL documentation has been now updated to clarify that -append enables -updateautomatically.
https://github....
2
votes
ogr2ogr merge two GeoJSON to one GeoJSON
You can also merge GeoJSON files using a JSON processing command line tool such as jq.
jq '{"type": "FeatureCollection", "features": [.[] | .features[]]}' --slurp input*....
2
votes
Accepted
Joining two polygons into one attribute table entry while maintaining separate boundaries
You need to fix the geometry of overlapping polygons, since the collection does not allow self-intersection.
You can find the exact location causing the errors with the Check validity tool.
2
votes
Merging polygons with adjacent polygons using QGIS
Step 1: Run Dissolve, using Class as the Dissolve field, and Keep disjoint features separate flag checked.
Step 2a: Use Field Calculator to add an Area field, to get the area in hectares.
Step 2b: ...
2
votes
Accepted
Superimpose two shapefiles in R
First I mock your data
rgn_shp <- giscoR::gisco_get_nuts(country = "ITA", nuts_level = 2)
prv_shp <- giscoR::gisco_get_nuts(country = "ITA", nuts_level = 3)
Now just plot ...
2
votes
Accepted
Combine features into new category
One way to do this is to run the processing function Statistics by Categories with settings as shown here:
Then export this to a csv field with field ld_use_des the only field that is exported. Then ...
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 ...
1
vote
Merge file of certain coordinates to shapefile of cities using ArcMap
You can use either
Spatial Join:
Joins attributes from one feature to another based on the spatial
relationship
Or Intersect:
Computes a geometric intersection of the input features. Features or
...
1
vote
Accepted
How to merge two *.gml files with different geometry types into one gml file
Instead of asking a drunk friend (or chatGPT) why not look at the actual documentation
OGR has limited support for GML reading and writing. Update of existing files is not supported.
So it won't ...
1
vote
Merging overlapping parts based on priority in QGIS
You can use Union, Delete duplicates by attribute together with Sort, to delete duplicate geometries except the first.
I have a field named prio with values from 1-5. Where polygons overlap I want to ...
1
vote
Superimpose two shapefiles in R
Before writing an excessive comment, I might try to post and answer as well. Since you did not provide data to work with and the popular nc dataset does not seem to contain several administrative ...
1
vote
Mosaic and merge rasters iteratively using R raster package
The raster packages is being replaced by terra (same developer) so, migrating is rather important before raster is depreciated (and it is notably faster). There are no longer separate classes for ...
1
vote
Accepted
Mosaic and merge rasters iteratively using R raster package
You can use the intersect() function from the raster package. The function will not return a condition rather it would return a new raster that overlaps from the two rasters. If it returns null the ...
1
vote
Accepted
Merge rasters with different extents and pixel sizes
The quick and easy way to do this is to use the Build Virtual Raster tool, in the Processing toolbox. You can choose the resolution and extent (as well as projection) of the virtual raster. If needed ...
1
vote
Select multiple features from multiple layers in QGIS
You can use pyqgis. I want to select features where "kkod" field is 428
sql = '"kkod"=428' #Adjust this
for layer in QgsProject.instance().mapLayers().values(): #For all layers ...
1
vote
Accepted
Merge Tool that adds source layer as a field in Attribute Table
This is not time consuming, you just need to read the help file! If you look at the last parameter of the merge tool you can tick on the source the data is coming from. This functionality has been ...
1
vote
Accepted
How to merge selected polygons with all adjacent polygons individually?
I asked the question some time ago, but just recently found the time to work on that problem again.
I wrote a Python-script for QGIS that worked fine for me. I just put it here, if anybody has a ...
1
vote
Accepted
How to unsplit/dissolve/merge lines with correct start and end vertex?
The solution for me was to use the "Dissolve" tool with the Unsplit lines option unchecked, instead of the "Unsplit Lines" tool. That way the vertices aligned correctly.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
merge × 1213qgis × 491
arcgis-desktop × 258
raster × 152
shapefile × 122
polygon × 99
arcpy × 94
arcmap × 79
dissolve × 64
line × 63
r × 58
gdal × 52
python × 49
postgis × 40
modelbuilder × 39
layers × 36
dem × 35
attribute-joins × 34
attribute-table × 33
overlapping-features × 33
pyqgis × 32
vector × 32
arcgis-pro × 30
mosaic × 30
geotiff-tiff × 28