<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">There is an old demo scripts in the library:<br>
<a href="ftp://cola.gmu.edu/grads/scripts/shp_demo1.gs">ftp://cola.gmu.edu/grads/scripts/shp_demo1.gs</a> (you might have to use wget to download this – some browsers are not supporting ftp urls anymore)<br>
<br>
That shows how you would query the shapefile database and use that information to draw individual shapes and colorize them accordingly. Should be enough to get you started.
<o:p></o:p></p>
<p class="MsoNormal">--Jennifer<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt">-- <span style="color:black"><br>
Jennifer Miletta Adams<br>
Senior Scientific Software Developer<br>
Goddard Earth Sciences Data and Information Services Center (GES DISC)<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;color:black">NASA/GSFC, Code 610.2</span><span style="font-size:9.0pt">
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;color:#AFABAB">Building 32, Room S159<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">gradsusr <gradsusr-bounces@gradsusr.org> on behalf of Jeff Duda <jeffduda319@gmail.com><br>
<b>Reply-To: </b>GrADS Users Forum <gradsusr@gradsusr.org><br>
<b>Date: </b>Monday, March 7, 2022 at 1:02 PM<br>
<b>To: </b>GrADS Users Forum <gradsusr@gradsusr.org><br>
<b>Subject: </b>[EXTERNAL] Re: [gradsusr] Plotting shapefile elements<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">Consult the GrADS user's page on shapefiles first: <a href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcola.gmu.edu%2Fgrads%2Fgadoc%2Fshapefiles.html&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdf9b8eed8f5542b4d26008da0064930e%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637822729215027072%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=wVrwmO3ec4DhAhzM4qrpfAsMB9qPeV%2FkS1tLqzRujD4%3D&reserved=0">
http://cola.gmu.edu/grads/gadoc/shapefiles.html</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I recommend writing each set of product types to a separate shapefile using 'gxout shp' and 'shpattr' to control which elements are draw to which file. Then plot all elements of each shapefile separately using traditional means.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Jeff Duda<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Mon, Mar 7, 2022 at 4:16 AM Jason M. Warren <<a href="mailto:jason@solargrafix.com">jason@solargrafix.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Hello,<br>
<br>
I am trying to plot a shapefile which contains multiple elements.  I <br>
queried the shp and dbf files as follows:<br>
<br>
<br>
ga-> q shp current_warnings<br>
Shapefile Type=Polygon #Shapes=4 XBounds=-88.9:-86.86 YBounds=29.38:37.16<br>
0:  Polygon  parts=1  vertices=5  XBounds=-88.05:-86.86 <br>
YBounds=29.38:30.01  ZBounds=0:0  MBounds=0:0<br>
1:  Polygon  parts=1  vertices=19  XBounds=-88.49:-87.05 <br>
YBounds=36.5:37.16  ZBounds=0:0  MBounds=0:0<br>
2:  Polygon  parts=1  vertices=8  XBounds=-88.9:-88.36 <br>
YBounds=31.43:31.63  ZBounds=0:0  MBounds=0:0<br>
3:  Polygon  parts=1  vertices=11  XBounds=-88.35:-88.01 <br>
YBounds=32.05:32.25  ZBounds=0:0  MBounds=0:0<br>
<br>
<br>
ga-> q dbf current_warnings<br>
RECORD#,PHENOM,SIG,WARNID,WFO,EVENT,ISSUANCE,EXPIRATION,URL,MSG_TYPE,PROD_TYPE <br>
<br>
0,MA,W,O.NEW.KMOB.MA.W.0008.0109022<br>
         2070225.670784,KMOB,0008,2022-01-09 19:02:25,2022-01-09 <br>
21:00:00,<a href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforecast.weather.gov%2Fproduct.php%3Fsite%3DMOB%26issuedby%3DMOB%26product%3DSMW%2CSMW%2CMarine&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdf9b8eed8f5542b4d26008da0064930e%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637822729215027072%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=qtkuA5rPRHeOdstj5pgdMeh9b91qSIwD7julI4WBZlE%3D&reserved=0" target="_blank">http://forecast.weather.gov/product.php?site=MOB&issuedby=MOB&product=SMW,SMW,Marine</a>
<br>
Warning<br>
1,FF,W,O.CON.KPAH.FF.W.0005.0109022<br>
         2055627.670773,KPAH,0005,2022-01-09 17:56:27,2022-01-09 <br>
21:15:00,<a href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforecast.weather.gov%2Fproduct.php%3Fsite%3DPAH%26issuedby%3DPAH%26product%3DFFS%2CFFS%2CFlash&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdf9b8eed8f5542b4d26008da0064930e%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637822729215027072%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=0wI1U7RhZ%2B%2FD5wHYxsQYkay1hmS2Qkf8NWrw7DS9emg%3D&reserved=0" target="_blank">http://forecast.weather.gov/product.php?site=PAH&issuedby=PAH&product=FFS,FFS,Flash</a>
<br>
Flood Warning<br>
2,SV,W,O.NEW.KMOB.SV.W.0003.0109022<br>
         2072922.670791,KMOB,0003,2022-01-09 19:29:22,2022-01-09 <br>
20:15:00,<a href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforecast.weather.gov%2Fproduct.php%3Fsite%3DMOB%26issuedby%3DMOB%26product%3DSVR%2CSVR%2CSevere&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdf9b8eed8f5542b4d26008da0064930e%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637822729215027072%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=uMifRxa39KLdSa%2BYeLHtWWhEjKNGQByDDZCfLZJdq0E%3D&reserved=0" target="_blank">http://forecast.weather.gov/product.php?site=MOB&issuedby=MOB&product=SVR,SVR,Severe</a>
<br>
Thunderstorm Warning<br>
3,SV,W,O.CON.KMOB.SV.W.0001.0109022<br>
         2072321.670789,KMOB,0001,2022-01-09 19:23:21,2022-01-09 <br>
19:45:00,<a href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforecast.weather.gov%2Fproduct.php%3Fsite%3DMOB%26issuedby%3DMOB%26product%3DSVS%2CSVS%2CSevere&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdf9b8eed8f5542b4d26008da0064930e%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637822729215027072%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=X%2FmetzjrgDAYdNAZSt9cJg6%2FPipzLg3uW1x0igy%2FE5c%3D&reserved=0" target="_blank">http://forecast.weather.gov/product.php?site=MOB&issuedby=MOB&product=SVS,SVS,Severe</a>
<br>
Thunderstorm Warning<br>
<br>
<br>
However, I can not figure out how to plot this with different colors for <br>
each element (SVR, SMW, etc...).  I have tried the following code which <br>
plots everything in the shapefile...<br>
<br>
<br>
'set rgb 1  255 0 0 255'<br>
'set shpopts -1'<br>
'set line 1 1 1'<br>
'draw shp current_warnings'<br>
<br>
<br>
But I need to know how to draw each kind of element separately (SVR, <br>
SMW, etc...).<br>
<br>
Thanks,<br>
<br>
Jason Warren<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdf9b8eed8f5542b4d26008da0064930e%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637822729215027072%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=i%2BUCssLExUr%2FM3JLiZKOkWoMlxIN3eT8P7bdBBqQZ20%3D&reserved=0" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">Jeff Duda, Research Scientist</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">University of Colorado Boulder<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Cooperative Institute for Research in Environmental Sciences<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">NOAA/OAR/ESRL/Global Systems Laboratory<br>
<span style="font-size:10.0pt">Boulder, CO</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>