2

When I attempt to add a shapefile from a folder to my ArcMap document I receive this message.

Why am I unable to add this shapefile? I've looked around for a similar issue, however other posts deal with open error "Getting “Failed to open tool” message when trying to run geoprocessing tool from C# code" or Error opening feature class of geodatabase in ArcGIS for Desktop? Don't really deal with my same issue.

Here is the message I receive:

enter image description here

All of the files and folders are in the same format and accessible the same way.

enter image description here

All the extensions are available and don't appear to be corrupt in anyway.

enter image description here

Here my shapefile icon displays black question mark in a green box.

enter image description here

Here are all the files in ArcMap except for the "glpv1" shapefile

enter image description here

When I open the file using QGIS, it displays and works just fine.

enter image description here

2
  • 2
    do you have the .dbf file?
    – artwork21
    Commented Dec 20, 2016 at 17:13
  • apparently not, that's seems to be the issue?
    – whyzar
    Commented Dec 20, 2016 at 19:18

2 Answers 2

7

Related to my comment, the minimum files to make up a shapefile are the .dbf, .shx, and .shp (.prj is nice to have too). You are missing the glpv1.dbf file.

0

You can generate a simple *.dbf file with Python as follows:

import shapefile # pyshp
import dbf
import os.path

fn_shp = "glpv1.shp"
myshp = open(fn_shp, "rb")

# If dbf does not exist, create one
fn_dbf = os.path.splitext(fn_shp)[0] + ".dbf"
if not os.path.exists(fn_dbf):
    r = shapefile.Reader(shp=myshp)
    n = len(r.shapes())
    db = dbf.Table(fn_dbf, 'ID N(8,0);')
    with db:
        for i in range(1, n+1):
            db.append((i,))
    r.close()

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.