Sample 25572: Clipping an area from a map using PROC GPROJECT and PROC GMAP
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.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample code uses the clipping capabilities of PROC GPROJECT to create a map of the states in the United States that border the Gulf of Mexico.
The graphics output in the Results tab was produced using SASĀ® 9.2. Submitting
the sample code with releases of SAS prior to SAS 9.2 might produce different results.
/* Define the libref of MAPS if necessary */
*libname maps 'location-of-map-datasets';
/* Set the graphics environment */
goptions reset=all border cback=white htitle=12pt;
/* 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;
/* Add a title to the map */
title1 'Northern Gulf Coast';
/* Create the clipped map */
proc gmap map=gulf data=gulf all;
id state;
choro state / nolegend;
run;
quit;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.

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 |