6

I am having a problem opening a shapefile using QGIS using 'add vector later'. This is the error message I am getting:

/Users/Conrad/AmerindianLands 2/Amerindian_Land_Karasabai.shp is not a valid or recognized data source

Can anyone help?

I have made sure that it is being extracted from a folder containing the other necessary files with the following extensions (.dbf,.prj,.shp, .sbx,.sbn).

4
  • 2
    Are you able to add other shapefiles that you know are not corrupted? Try downloading a country shapefile from GADM (gadm.org/country) and see if you get the same errors.
    – Aaron
    Apr 1, 2014 at 14:53
  • 1
    possible duplicate of How do I load a .dbf file into QGIS? Apr 1, 2014 at 15:01
  • Yes many thanks I haev opened other shapefiles without a problem Apr 1, 2014 at 15:04
  • I suspect that @Damian_H is correct--your shapefile needs the associated *.shx. Do you see the .shx file?
    – Aaron
    Apr 1, 2014 at 15:10

2 Answers 2

7

Have you got the *.shx file? It seems to be required to open shapefile.

12
  • 1
    I do not have an .shx file and suspected this might be a problem - I changed the .sbx file to an .shx file thinking it might help and it loads up but nothing appears? Apr 1, 2014 at 15:05
  • 3
    That's your problem. Only 3 of the shapefile's individual files are actually necessary for it to work: the .SHP, .SHX, and .DBF files. If one of those is missing, it won't work.
    – Dan C
    Apr 1, 2014 at 15:21
  • 1
    I think there is a huge difference between this two files, so you cant simple change sbx to shx.
    – dmh126
    Apr 1, 2014 at 15:26
  • 1
    @Vince there is no guarantee the records in the .shp file will correspond correctly to the records in the .dbf file. Often they will, but if the shapefile has undergone extensive edits and deletions--and depending on the software used to do them--there is no way reliably to recover the correspondence.
    – whuber
    Apr 1, 2014 at 16:06
  • 2
    @Vince That is not the case according to the ESRI technical description that governs the shapefile standard. I refer you to page 2 (which gives an overview) and page 23 (describing the .shx file). Nowhere does this document guarantee what you say. In fact, such a guarantee would obviate any need for the .shx file at all. Plenty of people have discovered this fact when they attempted to recreate a missing or corrupted .shx file and found that the attributes were mis-matched to the features.
    – whuber
    Apr 1, 2014 at 16:24
0

LAYERS -> ADD LAYER -> ADD VECTOR LAYER

Select the shp file in VECTOR DATASETs.

Import.

When it didn't work for me withe the same files I was using the wrong menu item or selecting the wrong files.

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.