[GIS] Copying fields from one layer to another in QGIS

layersqgisshapefile

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.

Best Answer

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

Related Question