GPROJECT Procedure

PROC GPROJECT Statement

Identifies the input and output map data sets. Can specify the type of projection, and the criteria for clipping and projection.
Requirement: An input map data set is required.

Syntax

PROC GPROJECT <option(s)>;

Summary of Optional Arguments

identifies the map data set to be processed.
specifies that projections wrap from right to left at the international dateline.
specifies that the units for the longitude (X variable) and latitude (Y variable) coordinates are degrees.
specifies that observations are retained when their projected X and Y values are identical to those in the previous observation.
specifies that the longitude (X variable) values in the input map data set increase to the east.
specifies that the LAT and LONG variables from the map data set are used for coordinate data instead of the X and Y variables.
specifies the maximum latitude that is included in the projection.
specifies the minimum latitude that is included in the projection.
specifies the maximum longitude to be included in the projection.
specifies the minimum longitude to be included in the projection.
specifies the longitude value in degrees for the center of the projection.
enables contiguous projections for maps that cross the line between 180 degrees and -180 degrees longitude.
specifies that observations are deleted when their projected X and Y values are identical to those in the previous observation.
specifies that parameters should not be used from the PROJPARM data set.
names the output map data set.
specifies the divisor that computes the values used for standard parallels for the Albers' or Lambert's projections when explicit values are not provided.
specify values for the standard parallels that are used in the Albers' or Lambert's projection.
specifies the entry in the projection parameters data set that is used for input parameters.
specifies a data set that contains input projection parameters.
creates a data set that contains the projection parameters for the current PROC GPROJECT statement.
specify a projection pole to use for the gnomonic projection.
specifies the projection method to apply to the map data set.
specifies that the units for the longitude (X variable) and latitude (Y variable) coordinates are radians.
specifies that the longitude (X variable) values in the input map data set increase to the west.

Optional Arguments

DATA=input-map-data-set
identifies the map data set to be processed. By default, the procedure uses the most recently created SAS data set.
DATELINE
specifies that projections wrap from right to left at the international dateline.
Note: The DATELINE option is in effect by default. You can use DATELINE to override the NODATELINE option from an input parameters file.
Interaction:If you specify both DATELINE and NODATELINE, then the last option that you specified is used.
DEGREES
specifies that the units for the longitude (X variable) and latitude (Y variable) coordinates are degrees. By default, coordinate units are considered to be radians. The GPROJECT procedure stops processing the data set if coordinates are out of range.
Alias:DEG
Interaction:If you specify both DEGREES and RADIANS, then the last option that you specified is used.
DUPOK
specifies that observations are retained when their projected X and Y values are identical to those in the previous observation. By default, successive identical observations are deleted.
Alias:ASIS
Interaction:If you specify both NODUP and DUPOK, then the last option that you specified is used.
Note:This option is useful when you want to add annotation to a map that contains duplicate coordinates.
EASTLONG
specifies that the longitude (X variable) values in the input map data set increase to the east (that is, positive longitude values are east of the prime meridian.) By default, longitude values increase to the west.
Alias:EAST
Interaction:If you specify both EASTLONG and WESTLONG, then the last option that you specified is used.
LATLON
specifies that the LAT and LONG variables from the map data set are used for coordinate data instead of the X and Y variables.
Alias:LATLONG
LATMAX=max-latitude
specifies the maximum latitude that is included in the projection. Any unit areas that cross the selected latitude are clipped and closed along the specified parallels. The LATMAX= and LATMIN= options do not have to be paired; you can specify a maximum latitude without specifying a minimum.
When PROJECT=ALBERS, LAMBERT, or GNOMON, the GPROJECT procedure treats the value of max-latitude as degrees. When PROJECT=NONE, the procedure treats the value as a Cartesian coordinate.
LATMIN=min-latitude
specifies the minimum latitude that is included in the projection. Any unit areas that cross the selected latitude are clipped and closed along the specified parallels. The LATMAX= and LATMIN= options do not have to be paired; you can specify a minimum latitude without specifying a maximum.
When PROJECT=ALBERS, LAMBERT, or GNOMON, the GPROJECT procedure treats the value of min-latitude as degrees. When PROJECT=NONE, the procedure treats the value as a Cartesian coordinate.
LONGMAX=max-longitude
specifies the maximum longitude to be included in the projection. Any unit areas that cross the selected longitude are clipped and closed along the specified meridians. The LATMAX= and LATMIN= options do not have to be paired; you can specify a maximum longitude without specifying a minimum.
When PROJECT=ALBERS, LAMBERT, or GNOMON, the GPROJECT procedure treats the value of max-longitude as degrees. When PROJECT=NONE, the procedure treats the value as a Cartesian coordinate.
LONGMIN=min-longitude
specifies the minimum longitude to be included in the projection. Any unit areas that cross the selected longitude are clipped and closed along the specified meridians. The LATMAX= and LATMIN= options do not have to be paired; you can specify a minimum longitude without specifying a maximum.
When PROJECT=ALBERS, LAMBERT, or GNOMON, the GPROJECT procedure treats the value of min-longitude as degrees. When PROJECT=NONE, the procedure treats the value as a Cartesian coordinate.
MERIDIAN= longitude-value
specifies the longitude value in degrees for the center of the projection. By default, the meridian value is the center of the map data or clip region.
Note: MERIDIAN= is functionally equivalent to POLELONG=.
NODATELINE
enables contiguous projections for maps that cross the line between 180 degrees and -180 degrees longitude. For example, if you project a map of Asia, then the eastern tip of the continent might be projected on the left side of the map by default. The NODATELINE option enables the entire continent to be projected as a contiguous area.
Interaction:If you specify both DATELINE and NODATELINE, then the last option that you specified is used.
NODUP
specifies that observations are deleted when their projected X and Y values are identical to those in the previous observation.
Note: The NODUP option is in effect by default. You can use NODUP to override the DUPOK option from an input parameters file.
Alias:NOASIS
Interaction:If you specify both NODUP and DUPOK, then the last option that you specified is used.
NOPARMIN
specifies that parameters should not be used from the PROJPARM data set. By default, the GPROJECT procedure reads input parameters from the PROJPARM data set of the library that contains the input data set.
OUT=output-map-data-set
names the output map data set, which contains the coordinates of the new unit areas that are created by the GPROJECT procedure.
By default, the GPROJECT procedure names the new data set that uses the DATAn naming convention. That is, the procedure uses the name WORK.DATAn, where n is the next unused number in sequence. Thus, the first automatically named data set is DATA1, the second is DATA2, and so on.
PARADIV=n
specifies the divisor that computes the values used for standard parallels for the Albers' or Lambert's projections when explicit values are not provided. By default PARADIV=4, which causes the standard parallels to be set at 1/4 and 3/4 of the range of latitude values in the input map data set.
PARMIN= data-set
specifies a data set that contains input projection parameters.
Alias:PIN
Default:The PROJPARM data set of the library that contains the input data set.
PARMOUT= data-set
PARMOUT
creates a data set that contains the projection parameters for the current PROC GPROJECT statement. If you specify a data set, then the parameters are created in that data set. If you do not specify a data set, then the parameters are created in PROJPARM data set of the library that contains the output data set.
Alias:POUT
PARMENTRY= entry-name
specifies the entry in the projection parameters data set that is used for input parameters. By default, the entry with the same name as the input data set is used. For example, if you specify data=MYMAPS.MAP5, then the GPROJECT procedure uses parameters from an entry named MAP5 in the parameters data set.
Alias:PENTRY
PARALLEL1=latitude
PARALLEL2=latitude
specify values for the standard parallels that are used in the Albers' or Lambert's projection. Latitude must be in degrees. Positive values indicate north of the equator, and negative values indicate south of the equator. These options are ignored for the gnomonic projection.
By default, the GPROJECT procedure calculates values for the standard parallels. The defaults are chosen to minimize the distortion inherent in the projection process. The algorithm used is as follows:
PARALLEL1 = minlat + R / PD
PARALLEL2 = maxlat - R / PD
where:
R
is the range of latitude values in the input map data set.
PD
is the PARADIV= value. (See the discussion of the PARADIV=n option.)
minlat
is the minimum latitude value in the input map data set.
maxlat
is the maximum latitude value in the input map data set.
If you do not use PARALLEL1= or PARALLEL2=, or you omit either option, the GPROJECT procedure uses the calculated value for the missing parameter.
The standard parallels, whether explicitly specified or supplied by the procedure, must lie on the same side of the equator. If they do not, PROC GPROJECT prints an error message and stops (the procedure might calculate standard parallels that lie on opposite sides of the equator). When projecting a map data set that contains unit areas that cross the equator, you might have to explicitly specify standard parallels that both lie on the same side of the equator. If this causes excessive distortion of the map, you might be able to use the gnomonic projection instead of the Albers' or Lambert's projection because the gnomonic technique has no such limitations at the equator.
Alias:PARALEL1, PARALEL2
POLELAT=latitude
POLELONG=longitude
specify a projection pole to use for the gnomonic projection. The projection pole is the point at which the surface of the sphere touches the surface of the imaginary plane onto which the map is projected. The POLELAT= option specifies the latitude of the projection point.
Units for latitude are degrees; positive values indicate north of the equator, and negative values indicate south of the equator. The POLELONG= option gives the longitude for the projection point. Units for longitude are degrees; positive values indicate west of the prime meridian, and negative values indicate east of the prime meridian (unless EASTLONG also has been used in the PROC GPROJECT statement).
If you do not use the POLELAT= or POLELONG= option, or you omit either option, PROC GPROJECT uses values for the position of the center of the unit areas that are defined by the DATA= data set for the missing parameter.
Note:The map that is defined by the input map data set should not contain points more than 85 degrees (1.48353 radians) from the projection pole; all points that exceed this value are deleted from the output map data set.
PROJECT=ALBERS | LAMBERT | GNOMON | NONE
specifies the projection method to apply to the map data set. Values for the PROJECT= option are as follows:
ALBERS
specifies Albers' equal-area projection with two standard parallels.
LAMBERT
specifies Lambert's conformal projection with two standard parallels.
GNOMON
specifies the gnomonic projection, which is an azimuthal projection.
NONE
specifies that no projection should be performed. Use this option in conjunction with the LATMIN=, LATMAX=, LONGMIN=, and LONGMAX= options to perform clipping without projection.
By default, PROJECT=ALBERS.
Note:There are several additional projections available. These projections are experimental and are not supported by SAS Institute Technical Support. The experimental projections are: ADAMS, AITOFF, APIANUS, ARAGO, BEHRMANN, BRAUN, CYLINDRI, ECKERT1, ECKERT3, ECKERT5, EQUIRECT or MARINUS, GALL, HAMMER, KVRSKY7, MILLER1, MILLER2 , ORTHO, PARABOLI, PETERS, PUTNINS4, ROBINSON, STEREO, WINKEL2.
RADIANS
specifies that the units for the longitude (X variable) and latitude (Y variable) coordinates are radians.
Note: The RADIANS option is in effect by default. You can use RADIANS to override the DEGREES option from an input parameters file.
Alias:NODEG
Interaction:If you specify both RADIANS and DEGREES, then the last option that you specified is used.
WESTLONG
specifies that the longitude (X variable) values in the input map data set increase to the west (that is, positive longitude values are west of the prime meridian.)
Note: The WESTLONG option is in effect by default. You can use WESTLONG to override the EASTLONG option from an input parameters file.
Alias:WEST
Interaction:If you specify both WESTLONG and EASTLONG, then the last option that you specified is used.