Chapter Contents

Previous

Next
The GPROJECT Procedure

Concepts


About the Input Map Data Set

The input map data set must be in map data set format (see SAS/GRAPH Map Data Sets), and it must contain these variables:

The X and Y variables contain the values that are to be projected.

In addition, the input map data set also can contain

Other variables in the input map data set do not affect the GPROJECT procedure.

Input Map Data Sets that Contain Only Unprojected Values

Note:   Projection is appropriate for map data sets in which the X and Y variable values represent longitude and latitude. Some of the map data sets that are supplied with SAS/GRAPH have already been projected; such data set should not be projected again.  [cautionend]

The following is a list of all of the Institute-supplied data sets that contain X and Y variables whose values are unprojected:

CANADA3
CANADA4
COUNTIES
COUNTY
STATES

See Using Default Projection Specifications for an illustration of this type of input map data set and the variables it contains.

Input Map Data Sets that Contain Both Projected and Unprojected Values

Most map data sets contain both sets of variables (X, Y and LONG, LAT) for projected and unprojected maps. In these cases, the X and Y variables will produce a projected map so you don't need to use the GPROJECT procedure. However, you may want to use the LONG and LAT variables to reproject the map using a different projection type. To do this you must first rename the LONG and LAT variables. It is necessary to rename the LONG and LAT variables because the GPROJECT procedure looks for variables that are named X and Y by default. You can create a new map data set using the OUT= option, drop the current X and Y variables, and rename the LONG and LAT variables. Your new data set will then contain unprojected values in X and Y. The following statements illustrate how to do this:

proc gproject data=map.austral
              (drop=x y rename=(long=x lat=y))
              out=reflib.newaust;
   id id;
run;

For additional information on the supplied SAS/GRAPH map data sets, see SAS/GRAPH Map Data Sets and the METAMAPS data set in your maps data set directory.


About Coordinate Values

Longitude and Latitude Coordinates shows the standard coordinate system for map data sets with coordinates in longitude and latitude. For the longitude and latitude values (below and to the right of the figure, respectively) the upper value is expressed in degrees and the lower value is expressed in radians. A radian is approximately 57.3 degrees.

Longitude and Latitude Coordinates

[IMAGE]

By default, the GPROJECT procedure assumes that the units for the input coordinate values are radians and that values for the horizontal coordinate increase from east to west across the map. If your map coordinates are stored as degrees of arc, use the DEGREE option in the PROC GPROJECT statement. If the horizontal coordinate values in the map increase west-to-east rather than east-to-west, use the EASTLONG option in the PROC GPROJECT statement. See Options for details of DEGREE and EASTLONG.

The unprojected map data sets that are provided with SAS/GRAPH can be projected if you use the default procedure characteristics: coordinate units in the data sets are radians, and horizontal values increase east-to-west.


About Types of Map Projections

The GPROJECT procedure performs three different types of projection: Albers' equal-area projection with two standard parallels (the default method), Lambert's conformal projection with two standard parallels, or the gnomonic projection (an azimuthal equidistant projection).

These sections describe the basic theory of each projection method. For comparison, Unprojected Map shows an unprojected map of the northern hemisphere.

Unprojected Map

[IMAGE]


Albers' Equal-Area Projection

The Albers' projection is a conic projection from the surface of the sphere to a cone secant to the sphere, cutting it at two standard parallels of latitude. The axis of the cone coincides with an extension of the polar axis of the sphere. Each section of the resulting map bears a constant ratio to the area of the sphere. In general, distortion in shape tends to increase toward the poles in latitudes outside of the two standard parallels.

The Albers' projection is well suited to portray areas of large and small east-to-west extent and produces satisfactory results in most cases. However, both standard parallels must lie on the same side of the equator, so this method may not be suitable for map data sets of large north-to-south extent that span the equator. For those map data sets, use the gnomonic projection method.

Albers' Projection illustrates an Albers' equal-area projection of the northern hemisphere.

Albers' Projection

[IMAGE]


Lambert's Conformal Projection

The Lambert's projection is obtained from a secant cone in the same manner as Albers' projection. In the Lambert's projection, meridians of longitude are straight lines that radiate from the apex of the cone, while parallels of latitude are concentric circles. The Lambert's projection is somewhat better than the Albers' projection at representing the original shape of projected unit areas, while the Albers' projection is somewhat better at representing relative sizes of projected unit areas.

The Lambert's projection is ideal for navigational charts and maps of relatively small east-to-west extent. However, as in the Albers' projection, both standard parallels must lie on the same side of the equator, so this method may not be suitable for map data sets that span the equator. For those map data sets, use the gnomonic projection method.

Lambert's Projection illustrates a Lambert's conformal projection of the northern hemisphere.

Lambert's Projection

[IMAGE]


Gnomonic Projection

The gnomonic projection is a planar projection from the surface of the sphere directly onto an imaginary plane tangent to the sphere at the map projection pole. By default, the projection pole is placed at the center of the map data set that is to be projected, but you can specify the projection pole to be anywhere on the surface of the sphere. (See POLELONG= and POLELAT= options.)

In the gnomonic projection, distortion increases as the distance from the map pole increases. Because of this distortion, the PROC GPROJECT procedure deletes all of the observations that lie more than 85 degrees from the map pole. The gnomonic projection is best suited for mapping areas of small east-to-west extent.

Gnomonic Projection illustrates a gnomonic projection of the northern hemisphere.

Gnomonic Projection

[IMAGE]


Chapter Contents

Previous

Next

Top of Page

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