2

For QGIS 3.14 I was following the tutorials, and I got stuck in adding my very first new vector layer.

Every time I tried to do the option new Vector Layer, no map appears and the the attribute table is empty. I tried using other shapefiles, the same thing happens, no map and no attributes. I have also tried using older versions but none works.

What do I do wrong?

enter image description here

4
  • yes @user2856. thank you for clarifying. :)
    – oric29
    Aug 4, 2020 at 2:25
  • 1
    In that case, it will of course be empty because you haven't created any spatial or attribute data. If you were trying to add an existing layer that contains spatial and attribute to QGIS, you have likely overwritten it and destroyed the existing data. Like saving an blank new Word document over an existing Word doc.
    – user2856
    Aug 4, 2020 at 2:30
  • i wanted to open this shapefile exercise_data/epsg4326/roads.shp like in the tutorials. And it says I should be able to see a lot of lines, symbolizing roads. But its empty.
    – oric29
    Aug 4, 2020 at 2:44
  • Thank you @user2856. I think that might be the case because when I opened a shapefile it says "The layer already exists, Are you sure you want to overwrite the existing file?". I must have skipped a step. I'll go over it again.
    – oric29
    Aug 4, 2020 at 2:57

1 Answer 1

7

You have created a new (empty) layer instead of opening an existing layer.

As a file with the same name as the new empty layer already existed, you would have seen a message "The layer already exists, Are you sure you want to overwrite the existing file?". Since you clicked "yes"/"ok", you have saved your newly created empty layer over the existing layer that contained data and destroyed it.

Next time use

  • Layer -> Add Layer -> Add Vector Layer (or various other ways including drag and drop onto the map)

instead of

  • Layer -> Create Layer -> Create New Shapefile Layer
1
  • 1
    Or, you may simply drag & drop any file QGIS can read onto the map canvas (e.g. .shp, .gpkg, .json)
    – Erik
    Aug 4, 2020 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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