(View the complete code for this example.)
This example retrieves the same hail data as in Example 50.9, but instead of requesting the KMZ format, it requests the SHP format, so that you can look at the data in a geospatial framework such as that provided by Esri mapping software. Output 50.10.1 shows the retrieved Esri shapefiles that contain the data for the observations within range of the weather station designated by the filter WSR_ID=KFWS.
options validvarname=any;
title 'Retrieve NOAA NX3HAIL Data for WSR_ID=KFWS on May 21, 2011';
libname mylib "/sasusr/noaa/doc/";
libname noaa sasenoaa "%sysget(NOAA_DATA)"
debug=on
noaaset=nx3hail
range='20110521:20110522'
filterBy='WSR_ID:KFWS'
filterByCondition='WSR_ID:or'
outshp=mySby
automap=replace
mapref=MyMap
shpmap="%sysget(NOAA_DATA)mySby.map"
format=shp
;
data mylib.HAILbyS;
set noaa.mySby;
run;
proc contents data=mylib.HAILbyS; run;
proc print data=mylib.HAILbyS; run;
Output 50.10.1: Using FORMAT= SHP Option to Retrieve NX3HAIL Data for WSR_ID:KFWS
| Files in the ZIP file |
| Obs | memname | isFolder | memcount |
|---|---|---|---|
| 1 | swdi-nx3hail-all-20180904-035109-488.dbf | 0 | 4 |
| 2 | swdi-nx3hail-all-20180904-035109-488.prj | 0 | 4 |
| 3 | swdi-nx3hail-all-20180904-035109-488.shp | 0 | 4 |
| 4 | swdi-nx3hail-all-20180904-035109-488.shx | 0 | 4 |
Note: The SASENOAA engine automatically unzips the ZIP file that contains the four shapefiles and renames them MYSBY.dbf, MYSBY.prj, MYSBY.shp, and MYSBY.shx.