22
votes
Accepted
ogr2ogr merge multiple shapefiles: What is the purpose of -nln tag?
For GDAL there are datastores which contain layers. Some datastores, like the database ones or GML, can hold several layers but some others like shapefiles can only contain one layer.
You can test ...
18
votes
Accepted
Merge thousands of rasters with gdal_merge.py
You can create a vrt file with gdalbuildvrt or gdal_merge.py -of VRT and then run gdal_translate -of GTiff on that VRT.
Like this, I had much faster results compared to gdal_merge with huge files.
...
17
votes
Accepted
sf geometry column naming differences R
I've just written this which I think will safely rename the geometry column by changing the names element and then setting the geometry column with st_geometry - which will affect the sf_column ...
16
votes
Merging multiple vector layers to one layer using QGIS
In the meantime, a tool called "Merge vector layers" has been added to QGIS under Vector > Data Management Tools > Merge Vector Layers or under Vector general in the Processing Toolbox ...
15
votes
Accepted
Rendering polygons ordered by size in QGIS
Most data providers do not guarantee any order in the way they deliver features. While an apparently stable order is often a side effect of the order in which features are stored in files, one shouldn'...
15
votes
Merging neighbouring polygons in QGIS
You can use the dissolve tool from the QGIS Processing Toolbox. You find it at Vector > Geoprocessing Tools > Dissolve (see documentation). This will give you a large polygon where all parts are ...
14
votes
Accepted
completing satellite imagery tiles when data coverage is less than 100%
For images of the same location but different dates, I would rather talk about compositing than mosaicing (which combines images from different extents into a larger image). You will find a lot of ...
13
votes
Accepted
Merging a geodataframe and pandas dataframe based on a column
You should specify a common key using on parameter. I removed merged_ prefix for legibility.
df = spatial_df.merge(tab_df, on='mukey', how='left')
# df = tab_df.merge(spatial_df, on='mukey', how='...
13
votes
Accepted
Merging multiple temporal inputs in QGIS Graphical Modeler
Change your input back to the 123 Button (="Value-Input"). If you then click on the three dots ... to the right of the input line, you can choose your layers. Here, all layers from your ...
12
votes
Merging multiple vector layers to one layer using QGIS
You can also use the v.patch module under GRASS GIS commands. It's available in the processing toolbox.
You can search for it when the dropdown at the bottom of the Processing Toolbox window is ...
12
votes
Accepted
Merging spatially separated polygons into one feature in QGIS
Check the corresponding geoalgorithm in the Processing Toolbox (Ctrl+Shift+T).
For QGIS 3 : "Promote to multipart"
For QGIS 2 : "Singleparts to multipart"
11
votes
Accepted
How to merge two shapefiles with partial difference in QGIS?
You could use this approach
Then to:
Ensure the correct shapefile type is selected (points, lines, or polygons).
Select the folder where the two (or more) shapefiles you want to merge are located ...
11
votes
Accepted
Merging drone/photogrammetry-derived DEM and satellite-derived DEM using ArcGIS Pro
Assuming:
both are in the same projection / coordinate reference system,
you have a Image/Spatial Analyst license, and
NoData has been set correctly on the High res DEM.
You could use a Raster ...
10
votes
Merge two shapefiles in R
You can use raster::bind. That function combines the geometries and the attributes, even if the variable names do not match.
Example data:
library(raster)
p <- shapefile(system.file("external/lux....
10
votes
Accepted
Merging overlapping buildings but not adjacent buildings using ArcMap?
Intersect the buildings with themselves
Select By Location to only select buildings with overlaps:
Dissolve the selected features
Start editing on building and delete all selected features. Stop ...
10
votes
Merging raster in R
The terra package has a new object class SpatRasterCollection for image collections than can be used with terra::mosaic or terra::merge. This greatly simplifies mosaic operations. Here is an example ...
9
votes
Accepted
How to merge line and polygon?
Shapefiles can store only single type of geometry (in your case either polygons or lines, not both). So, a shapefile cannot contain both lines and polygons.
Another thing is that a single feature ...
9
votes
Accepted
Merging small polygons into larger adjacent polygons using QGIS
you can use the processing tool "multiparts to singleparts" before: this will convert the multipolygon (the green one) into single polygons which you can join/merge afterwards.
9
votes
Merging multiple temporal inputs in QGIS Graphical Modeler
I'm on QGIS 3.18.2, array() works for me. Consider this model:
You are on the right track with expression, in my case it looks like
following the hint "Expected input: an array of layer paths, ....
9
votes
Accepted
Performing merge in PostGIS
Use UNION or UNION ALL, depending on whether you want duplicates. Example:
SELECT f1,f2,f3
FROM t1
UNION
SELECT f1,f2,f3
FROM t2
Assuming the structure is exact across all three tables, the schema ...
9
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 &...
8
votes
Finding and merging lines that touch in PostGIS?
Another option: use the PostGIS ST_LineMerge function. Here's the previous example redone with it:
WITH data(geom) AS (
VALUES
('LINESTRING (0 0, 1 1)'),
('LINESTRING (2 2, 1 1)'),...
8
votes
Accepted
Merging two shapefiles using ArcPy?
You have too many closing parentheses in your code:
arcpy.Merge_management(["o.shp", "d.shp"], "C:/GIS/m.shp"))
^
Remove the extra )
arcpy....
8
votes
Rendering polygons ordered by size in QGIS
You need to use Union Tool from Vector -> Geoprocessing tools -> Union. This should give you the correct topology. Or, you can use difference tool repeatedly to get the difference between big ...
8
votes
QGIS change geometry type in shapefile
From @Joseph comment :
Right-click the layer and select Save As.... In the Layer Options
section, there is a dropdown menu for SHPT. Select Polygon, this
should re-save the polygon layer ...
8
votes
Accepted
Merging lines (with and with no overlaps) in QGIS
@oskarlin, I tried to recreate a similar example of your layers.
However, I do not know whether your Layers consist of line segments
(polylines) or continuous lines (monolines), therefore there are ...
8
votes
sf geometry column naming differences R
A way of renaming the geometry variable has been implemented in sf as explained in this issue. Thus in the previous example you just use this command:
st_geometry(nc) <- "gyom"
7
votes
Merging polygons based on five first digits in id using QGIS
If the field type is not string, then the simplest way is to create a new field with Text type of 5 characters length. Then in the field calculator go to Update existing field and select the newly ...
7
votes
Accepted
Which value does raster merge chose in overlapping area?
If you're using the standard gdal_merge, later rasters overwrite earlier rasters (as in, the order they appear in the command line).
From the usage document (emphasis mine)
This utility will ...
7
votes
Accepted
How to overlap and merge layers in QGIS?
First use 'Symetrical Difference' instead of 'Intersection' in the Geoprocessing toolbox and then in a second step do 'Union'.
The yellow triangle in 2. is spatially in the same location as in 1. ...
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