The GPROJECT procedure
can create rectangular subsets of the input map data set. This capability
provides a way to extract a portion of a larger map if you do not
need all the original unit areas for your graph. The procedure enables
you to clip unit area boundaries at specified latitude values, longitude
values, or both. Unit areas that fall completely outside of the specified
clipping limits are excluded from the output map data set. Unit areas
bisected by the clipping limits are closed along the clipping parallels
and meridians, and all points outside of the clipping limits are excluded.
If the input map data
set contains the DENSITY variable, any new vertex points and corners
that are created by PROC GPROJECT are assigned a DENSITY value of
0 in the output map data set. This enables you to use a subset of
the clipped map without using PROC GREDUCE to assign new DENSITY values.
(See
GREDUCE Procedure for information about how to reduce the number of points
that you need to draw a map.)
You can specify the
minimum latitude to be retained in the output map data set with the
LATMIN= option and the maximum latitude with LATMAX= option. Minimum
and maximum longitude values are specified with the LONGMIN= and LONGMAX=
options, respectively.
This is how the PROC
GPROJECT interprets the clipping longitude and latitude values:
-
If you specify PROJECT=NONE in
the PROC GPROJECT statement, the procedure assumes that the input
map data set is already projected and the clipping longitude and latitude
values are Cartesian coordinates. In this case, the LATMAX= and LATMIN=
options specify the top and bottom edges, respectively, of the area
that you want to extract, and the LONGMAX= and LONGMIN= options specify
right and left edges, respectively.
You must be familiar
with the range of values in the X and Y variables in order to select
appropriate clipping limits. Use the MEANS or SUMMARY procedure in
Base SAS to determine the range of values in X and Y. See the
Base SAS Procedures Guide for more information.
-
In all other projections, the clipping
values are treated as degrees.
Depending on the size
and position of the clipped area and the type of projection that is
performed, the resulting map might not be exactly rectangular. PROC
GPROJECT performs clipping before projection, so the clipped area
might be distorted by the projection process.
To produce a clipped
area with a rectangular shape, use PROC GPROJECT in two steps:
-
Project the map using
the appropriate projection method and projection criteria.
-
Project the map using
PROJECT=NONE, and use the LATMIN=, LATMAX=, LONGMIN=, and LONGMAX=
options to clip the map.