Chapter Contents


The GPROJECT Procedure

Using the GPROJECT Procedure

The GPROJECT procedure uses a default projection method and default projection criteria to project your map data set. If you do not want to use these defaults, you can use PROC GPROJECT statement options to

The following sections describe how you can use PROC GPROJECT statement options to select your own projection method and projection criteria.

Selecting Projections

Except when projecting map data sets that cover large areas, all three types of projections (Albers', Lambert's, and gnomonic) produce relatively similar results when you use default projection criteria, so you usually do not need to be concerned about which projection method to use when you produce maps solely for graphics output.

However, the default projection criteria may be unsuitable in some circumstances. In particular, the default specifications fail when the map that is being projected extends on both sides of the equator. On other occasions, you may want to select a projection method to achieve a particular effect.

For the Albers' and Lambert's projections, the two standard parallels must both lie on the same side of the equator. PROC GPROJECT stops with an error message if this condition is not met, regardless of whether you explicitly specify parallel values or let the procedure calculate default values. See the descriptions of PARALEL1= and PARALEL2= for more information on how to specify the two standard parallels.

Controlling Projection Criteria

For both the Albers' and Lambert's projections, PROC GPROJECT calculates appropriate standard parallels. You can override either or both of these selections if you explicitly specify values for the PARALEL1= or PARALEL2= option. You can influence the selection of default parallels if you use the PARADIV= option. See Options for more information on these options.

For the gnomonic projection, PROC GPROJECT determines the longitude and latitude of the approximate center of the input map data set area. You can override either or both of these selections if you explicitly specify values for the POLELAT= or POLELONG= option. See Options for more information.

The clipping options, discussed in Clipping Map Data Sets, can also influence the calculations of the default standard parallels by changing the minimum and maximum coordinate values.

Clipping Map Data Sets

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 parallels of latitude or meridians of longitude 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 The GREDUCE Procedure for information on 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 LATMIN= and the maximum latitude with LATMAX= . Minimum and maximum longitude values are specified with LONGMIN= and LONGMAX=, respectively. See Options for more details on these options.

This is how the PROC GPROJECT interprets the clipping longitude and latitude values:

Depending on the size and position of the clipped area and the type of projection that is performed, the resulting map may not be exactly rectangular. PROC GPROJECT performs clipping before projection, so the clipped area may be distorted by the projection process.

To produce a clipped area with a rectangular shape, use PROC GPROJECT in two steps:

  1. Project the map using the appropriate projection method and projection criteria.

  2. Project the map using PROJECT=NONE, and use LATMIN=, LATMAX=, LONGMIN=, and LONGMAX= to clip the map.

See Clipping an Area from the Map, for an example of clipping an area from an unprojected map data set.

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.