Sample 25572: Clipping an area from a map using PROC GPROJECT
This sample is from the "SAS/GRAPH Software: Reference, Version 8", Volume 2, Chapter 23.
For additional information on the sample refer to this book.
/*+-------------------------------------------------------------+
| S A S S A M P L E L I B R A R Y |
| |
| NAME: GPJCLIPP |
| TITLE: GPJCLIPP-Clipping an Area from a Map |
| PRODUCT: GRAPH |
| SYSTEM: ALL |
| KEYS: GRAPHICS GOPTIONS GMAP GPROJECT MAPS PATTERN |
| PROCS: GMAP GPROJECT |
| DATA: EXTERNAL |
| |
| SUPPORT: GRAPHICS STAFF UPDATE: |
| REF: SAS/GRAPH REFERENCE GUIDE |
| MISC: EDIT AND UNCOMMENT THE LIBNAME STATEMENTS |
| IF THE LIBREFS HAVE NOT BEEN DEFINED. |
+-------------------------------------------------------------+*/
/* Define the libref maps */
*libname maps 'SAS-MAPS-library';
/* Set the graphics environment */
goptions reset=all gunit=pct border cback=white
colors=(black blue green red)
ftext=swiss htitle=6 htext=3;
/* Clip and project rectangular subset of the map */
proc gproject data=maps.states
out=gulf
longmin=81
longmax=98
latmin=25
latmax=33;
where density<5;
id state;
run;
/* Define title and footnote for map */
title 'Northern Gulf Coast';
footnote j=r 'GPJCLIPP ';
/* Define pattern characteristics */
pattern value=mempty repeat=7 color=blue;
/* Show clipped map */
proc gmap map=gulf data=gulf all;
id state;
choro state / nolegend;
run;
quit;

This example uses the clipping capabilities of PROC GPROJECT to create a map of the states in the United States that border the Gulf of Mexico.
| Type: | Sample |
| Topic: | Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Maps SAS Reference ==> Procedures ==> GMAP SAS Reference ==> Procedures ==> GPROJECT
|
| Date Modified: | 2005-08-27 03:03:25 |
| Date Created: | 2005-05-23 14:16:21 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |