This command reports information about a shapefile in preparation for loading it into an ArcSDE feature class.
Note: This function is not supported on 64-bit Windows, Linux, or HP-UX Itanium.
shpinfo [-o describe] -f <shape_file>
[-d <{shape | sde | both}>]
shpinfo -o stats -f <shape_file> [-d
<{shape | sde | both}>]
shpinfo -h
Operation | Description |
describe | Lists the shapefile header and attribute column definitions (the default) |
stats | Performs the describe operation and lists statistical information |
Options | Description |
-d |
Displays attribute column definitions shape: Displays column definitions in shape format (the default) sde: Displays column definitions in ArcSDE format both: Displays column definitions in shape and ArcSDE formats |
-f | Path to and name of the shapefile |
-h or -? | Either option used to see the usage and options for the command (Note: If using a C shell, use -h or "-\?".) |
-o | Operation |
Before importing a shapefile to an ArcSDE geodatabase, you probably want to find out information about the file. The shpinfo command returns the header information and column definitions of the shapefile. Though this command does not actually involve the geodatabase, it is a tool you might use prior to importing a shapefile to the geodatabase using the shp2sde command.
In the following example, information from the fland shapefile's header file is returned, as are the shapefile attribute definitions:
C:\ArcGIS\ArcSDE\>shpinfo -o describe -f c:\data\fland -d shape
Shape File: c:\data\fland
Version: 1000
Codepage: 1252
Type: Polygon
Number of Shapes: 40426
Extent: minX: -179.133392334 minY: 17.67469215393
maxX: 179.7882080078 maxY: 71.34069824219
Shape Attribute Columns: 10
Name Type Width Decimal Places
AREA N 12 3
PERIMETER N 12 3
LANDID N 11 -
FEATURE1 C 80 -
FEATURE2 C 80 -
URL C 150 -
NAME1 C 80 -
NAME2 C 80 -
STATE C 14 -
STATE_FIPS C 14 -
This is the information for the attribute columns as they exist in the dbf file.
The sde information for the same shapefile returns the header information, as well as the ArcSDE data type definitions, as shown in the following example:
C:\ArcGIS\ArcSDE\>shpinfo -o describe -f c:\data\fland -d sde
Shape File: c:\data\fland
Version: 1000
Codepage: 1252
Type: Polygon
Number of Shapes: 40426
Extent: minX: -179.133392334 minY: 17.67469215393
maxX: 179.7882080078 maxY: 71.34069824219
SDE Attribute Columns: 10
Name Type
Width Decimal Places NULL?
AREA SE_DOUBLE 15 3
PERIMETER SE_DOUBLE 15 3
LANDID SE_DOUBLE 11 -
FEATURE1 SE_STRING 80 -
FEATURE2 SE_STRING 80 -
URL SE_STRING 150 -
NAME1 SE_STRING 80 -
NAME2 SE_STRING 80 -
STATE SE_STRING 14 -
STATE_FIPS SE_STRING 14 -
SDE column definition string:
AREA double(15,3), PERIMETER double(15,3), LANDID double(11), FEATURE1
string(80), FEATURE2 string(80), URL
string(150), NAME1 string(80), NAME2 string(80),
STATE string(14), STATE_FIPS string(14)
The -d sde option returns the column definitions that will be used to create or add to the business table in the geodatabase when you execute the shp2sde init or append operations.
In the next example, both the shape and sde information are returned for the cities shapefile.
$ shpinfo -o stats -f cities -d both
Shape File: /world/cities
Type: Point
Number of Shapes: 606
Extent: minx: -165.2700042724 miny: -53.15000152587
maxx: 177.1301879882 maxy: 78.19999694824
Shape Attribute Columns: 4
Name Type Width Decimal Places
NAME C 40 -
COUNTRY C 12 -
POPULATION N 11 -
CAPITAL C 1 -
SDE Attribute Columns: 4
Name Type Width Decimal Places NULL?
NAME SE_STRING 40 -
COUNTRY SE_STRING 12 -
POPULATION SE_DOUBLE 12 1
CAPITAL SE_STRING 1 -
SDE column definition string:
NAME string(40), COUNTRY string(12), POPULATION
double(12,1), CAPITAL string(1)
Home
Copyright © Environmental Systems Research Institute, Inc. 2004 - 2010. |