1

enter image description here

I was wondering if there is a way to split a shapefile's features in QGIS?

I have many polygons in a shapefile which are separated geometrically. But in their attribute table they all have came in just one row. So I can not use "split vector layer" command. Is there any automated command to split these features?

In the picture as you can see all these polygons are in one layer. I want each part to be in a separated layer.

i tried using multipart to single part command but it raised this error:

Traceback (most recent call last): File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\algs\qgis\VectorSplit.py", line 114, in processAlgorithm sink, dest = QgsProcessingUtils.createFeatureSink(fName, context, fields, geomType, crs) _core.QgsProcessingException: Could not create layer C:/Users/esmae/AppData/Local/Temp/processing_0e22d2fe65794057b6026c802fc150a0/63c9824b0ad746159e05fdf243fec6f8/OUTPUT\fid_27.0.gpkg: Creation of field fid failed (OGR error: Wrong field type for fid) –

my qgis version is 3.6

  • 2
    What is your desired/expected output? What does your input shapefile look like, is it a polyline etc.? In case if you do not have any predicates and specific requirements you may using the SAGA-GIS Module Split Shapes Layer Randomly. Additionally, for polylines, you can try the GRASS algorithm called v.split, that splits vector lines to shorter segments. – Taras Mar 20 at 5:59
  • Ii changed the question. Is it clear now? – mohamad esmaeeli Mar 20 at 15:43
  • 4
    You want Multipart to Singleparts. From the Vector Menu> Geometry Tools. – HeikkiVesanto Mar 20 at 15:45
  • 1
    What was the error message? – BERA Mar 20 at 17:12
  • 1
    @mohamadesmaeeli Please edit your question to include your multipart to singlepart attempt as well as the error message it produced. That way potential answerers won't have to read through the comments to understand your question. – Andy Mar 21 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.