1

I am new to QGIS. I need to create hundreds of shapefile layers with the same fields but different points and attribute values:

  1. The first shapefile one I created with 12 fields (columns).
  2. To create the second, I duplicated the first one.
  3. Unchecked the first one to guarantee its safe.
  4. In the attribute table, deleted all the points of the second since the only thing important here is to keep the fields titles.
  5. Start to map new points with its new attributes.

After click on save layer edits, all my points on the first layer are gone. I can not understand why the points and data on the first layer are being deleted.

  • 8
    Duplicating the layer in QGIS Canvas does not mean creating a new shapefile in your hard disk, you are still referencing to the same shapefile in your HDD. To create a new shapefile you need to right-click -> export as new shapefile. – ahmadhanb Jul 5 at 6:23
  • 1
    @ahmadhanb please make this an answer so it can be accepted and upvoted – Ian Turton Jul 5 at 7:43
  • @IanTurton Thank you very much. The comment was added as an answer. – ahmadhanb Jul 5 at 8:50
4

Duplicating the layer in QGIS Canvas does not mean creating a new shapefile in your hard disk (HDD), you are still referencing to the same shapefile in your HDD. To create a new shapefile you need to right-click -> Export -> Save feature as and create a new shapefile.

Before exporting to a new shapefile, you can uncheck the fields that you do not need and check the fields the you want to keep in the new shapefile

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.