<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.--> <html> <head> <title>GrADS command: draw shp</title> </head> <body bgcolor="e0f0ff" text="#000000"> <H2><B>draw shp</B></H2> <P> <code>draw shp <i>shapefile <n> <m> </i></code> <p> Draws the contents of a shapefile. The arguments are: <p> <code><i>shapefile</i> </code>The name of the shapefile. It is not necessary to include the file extension (.shp)<br> <codoe> <code><i>n</i> </code>Element number (if you want to draw only one)<br> <codoe> <code><i>m</i> </code>Use <code><i>n</i></code> and <code><i>m</i></code> if you want to draw a range of elements <p>If <code><i>n</i></code> and <code><i>m</i></code> are omitted, all the elements in the shapefile will be drawn. <br> <p> <h3>Usage Notes</h3> <p>This command is available with GrADS version 2.0.a8 or later.</p> <p>If you put the three shapefile components (*.shp, *.shx, and *.dbf) in the GrADS data directory (pointed to by the <a href="gradcomdgrads.html#env">GADDIR environment variable</a>), then it is not necessary to include the full path in <code><i>shapefile</i></code>. </p> <p> Before invoking this command, it is necessary to draw a plot first in order to establish the dimensions and scaling of the display. Shapefiles contain 2-dimensional spatial features, so your plot must be varying in the X-Y (lon/lat) domain. A shapefile may contain one of three kinds of graphical elements: points, lines, or polygons. </p> <ul> <li> For shapefiles that contain points, GrADS will draw a mark at each point location. The mark type and size are controlled by the <code><a href="gradcomdsetshpopts.html">set shpopts</a></code> command, and the color is controlled by the <code><a href="gradcomdsetline.html">set line</a></code> command. </li> <li>For shapefiles that contain lines, GrADS will draw the line elements using the color, style, and thickness settings that are controlled by the <code><a href="gradcomdsetline.html">set line</a></code> command. </li> <li>For shapefiles that contain polygons, the default behavior of GrADS is draw only the perimeter of each polygon element. Use the <code><a href="gradcomdsetshpopts.html">set shpopts</a></code> command to draw filled polygons and set the fill color. The color, style, and thickness of the polygon perimeters are controlled by the <code><a href="gradcomdsetline.html">set line</a></code> command. </li> </ul> <p>Please see the documentation page on <a href="shapefiles.html">shapefiles</a> for more details. </p> <h3>Examples </h3> </body> </html>