Chapter Contents

Previous

Next
The GPROJECT Procedure

Overview

The GPROJECT procedure processes map data sets by converting spherical coordinates (longitude and latitude) into Cartesian coordinates for use by the GMAP procedure. This process of converting coordinates from spherical to Cartesian is called projecting. In many of the geographic map data sets that are available with SAS/GRAPH software, the observation values are stored as longitude and latitude coordinates on a sphere (which means the map is unprojected). When these observations are plotted by the GMAP procedure, which is designed to plot points on a two-dimensional plane, the resulting map is often reversed and elongated as a result of forcing the curved map surface onto a flat plane.

The GPROJECT procedure enables you to use one of several map projection techniques to project the coordinates onto a two-dimensional plane while attempting to minimize the distortion of area, distance, direction, and shape properties of the original sphere. (The earth is not precisely spherical and the GPROJECT procedure does not attempt to correct this small distortion.) The output map data set that is produced by the procedure contains coordinate values expressed in Cartesian coordinates that can be displayed correctly using the GMAP procedure.

The GPROJECT procedure also can create a rectangular subset of the input map data set by excluding all points with longitude and latitude values that fall outside of a specified range. This provides a handy way to reduce the size of the map data set if you need only a portion of a larger map.

The GPROJECT procedure does not produce any graphics output. Instead, it produces an output map data set, which typically becomes the input map data set for the GMAP procedure (see The GMAP Procedure).

Map before Projection (GR23N01(a)) and Map after Projection (GR23N01(b)) illustrate the effect of using GPROJECT defaults (Albers projection with standard parallels that are calculated by the procedure) to project a typical map data set with coordinates that are stored as longitude and latitude.

The program for the following maps can be seen in Using Default Projection Specifications.

Map before Projection (GR23N01(a))

[IMAGE]

Map after Projection (GR23N01(b))

[IMAGE]


Chapter Contents

Previous

Next

Top of Page

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