I have a layer (GeoJSON) with multiple features. I want to split the layer up into multiple shapefiles using QGIS.
I don't want a file for each individual feature. Is it possible in QGIS to select features and cut and paste them to a new file?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI have a layer (GeoJSON) with multiple features. I want to split the layer up into multiple shapefiles using QGIS.
I don't want a file for each individual feature. Is it possible in QGIS to select features and cut and paste them to a new file?
It was not clear to me how the features have to be split and saved, e.g. only selected or simply all. Hereupon I am providing several possibilities that may answer the question.
Case 1. When certain features have to be selected and exported afterwards
Check the following articles:
Exactly what @Erik mentioned in his comments.
Case 2. When all features have to be exported
Let's assume there is a polygon layer called 'grid'
with its corresponding Attribute Table, see the image below.
In the attribute table, there is a unique attribute, for example "ID"
, otherwise create it using @row_number
in the Field Calculator.
Proceed with "Split vector layer" can be found in Vector > Data Management Tools > Split Vector Layer...
using the "ID"
as 'a Unique ID Field'.
And get the output
Note: Mind that every single output will be temporal and in .gpkg
-format.
Case 3. When all features have to be exported but they possess an attribute in common.
It can be done the same way as was done on Step 2. Nevertheless, there is an additional way described in this thread: Dividing shapefile into multiple shapefiles using an attribute value in QGIS Graphical Modeler