## q shp

`q shp shapefile`

Lists the contents of a shapefile. `shapefile` is the name of the shapefile. It is not necessary to include the file extension (.shp) on the end of `shapefile`, just the filename root is adequate.

### Usage Notes

This command is available with GrADS version 2.0.a8 or later.

If you put the three shapefile components (*.shp, *.shx, and *.dbf) in the GrADS data directory (pointed to by the GADDIR environment variable), then it is not necessary to include the full path in `shapefile`.

The first line of output contains the shapefile type, the number of shapes in the file, and the X and Y bounds of actual extent of the shapes in the file. Subsequent lines list information about each shape element in the file: the identification number, the shape type, the number of parts, the number of vertices, and the bounds of the shape in the X, Y, Z, and M (measure) dimesions. The current GrADS interface ignores the Z or M values of a shape, only it's position in X,Y (lon,lat) space is relevant.

A companion command, `q dbf`, lists the attribute database entries for each element in the shapefile. There is a 1:1 correspondence between elements in the shapefile and records in the database.

Please see the documentation page on shapefiles for more details.

### Examples

    ga-> q shp /home/GIS/climatedivs/divisions

    Shapefile Type=Polygon #Shapes=387 XBounds=-124.761:-66.95 YBounds=24.545:49.385
    0:  Polygon  parts=1  vertices=51  XBounds=-95.602:-93.056  YBounds=46.285:49.385  ZBounds=0:0  MBounds=0:0
    1:  Polygon  parts=1  vertices=88  XBounds=-123.081:-121.919  YBounds=46.621:49.002  ZBounds=0:0  MBounds=0:0
    2:  Polygon  parts=1  vertices=135  XBounds=-123.773:-121.207  YBounds=45.548:49.002  ZBounds=0:0  MBounds=0:0
    3:  Polygon  parts=1  vertices=91  XBounds=-121.611:-119.484  YBounds=45.681:49.001  ZBounds=0:0  MBounds=0:0
    4:  Polygon  parts=1  vertices=36  XBounds=-120.46:-117.558  YBounds=47.149:49.001  ZBounds=0:0  MBounds=0:0
    5:  Polygon  parts=1  vertices=25  XBounds=-117.041:-116.048  YBounds=47.006:49.001  ZBounds=0:0  MBounds=0:0
    .
    .
    .
    385:  Polygon  parts=1  vertices=46  XBounds=-122.513:-121.659  YBounds=43.551:45.647  ZBounds=0:0  MBounds=0:0
    386:  Polygon  parts=1  vertices=67  XBounds=-121.946:-118.222  YBounds=44.771:46.001  ZBounds=0:0  MBounds=0:0