masksamp [ parameter=value ... ] [ inputfile outputfile ] masksamp [ parameter=value ... ] [ inputfile ... directory ]
Parameters are: point_file, points_are, include_vars, use_badval, mask_value, mask_inside.
masksamp takes one or more 2-D input datasets and assigns a mask value based on points specified by a locations file. Either all points specified by the locations file are assigned the mask value, or all points except those specified by the locations file are assigned the mask value.
One output file is created for each input file. Only the variables specified by the user are 'masked' and written to the output file. The contents of the point_file and the method of masking is based on the specification of the parameter points_are as follows:
1) points - requires a 1-D dataset of (x, y) or (lat, lon) pairs. The list can be any dimension and the variables must be named (x, y) or (latitude, longitude), respectively. The output datasets have the mask value assigned at the locations specified in the list.
2) vectors - requires a 1-D dataset of (x, y, delta-x, delta-y) or (lat, lon, delta-lat, delta-lon) values. The list can be any dimension and the variables must be named (x, y, delta-x, delta-y) or (latitude, longitude, delta-lat, delta-lon), respectively. The output datasets have the mask value assigned at the locations along the specified vectors.
3) tracks - requires a 1-D dataset of (x, y) or (lat, lon) pairs. The list can be any dimension and the variables must be named (x, y) or (latitude, longitude), respectively. The list is interpreted to represent one or more sequences of points (one or more tracks). Points in the list made up of bad_values (see datasets) delimit tracks; i.e., the previous tracks is ended and the next point starts a new track. The output datasets have mask values assigned at the locations along the specified tracks.
4) outlines - requires a 1-D dataset of (x, y) or (lat, lon) pairs. The list can be any dimension and the variables must be named (x, y) or (latitude, longitude), respectively. The list is interpreted to represent one or more connected regions (or polygons). Points in the list made up of bad_values (see datasets) delimit polygons; i.e., the previous region being outlined is closed and the next point starts a new polygon. The output datasets have mask values assigned inside the outlined region.
5) boxes - requires a 1-D dataset of (x, y, delta-x, delta-y) or (lat, lon, delta-lat, delta-lon) values. The list can be any dimension and the variables must be named (x, y, delta-x, delta-y) or (latitude, longitude, delta-lat, delta-lon), respectively. Each point in the list is interpreted to represent two opposite corners of a rectangle. The output datasets have mask values assigned inside the rectangles.
All input datasets are assumed to have line and sample or latitude and longitude dimensions. They are also assumed to have the same variable names, datatype, bad value, units, and scaling as the first input dataset. An error is returned if the variable names, size of the dimensions, or datatype do not all match. If latitude and longitude format is used for specifying points, each dataset must have the same earth transform.
The xvu function can be used to generate a list of sample locations.
This is the name of the TeraScan dataset containing the 1-D set of points (see descriptions above).
There is no default.
Specifies the sampling method (see descriptions above).
Valid responses are [ points, vectors, tracks, outlines, boxes ]. The default is points.
Specifies which variables in the input dataset(s) to sample and write to the output datasets. If this list is prefixed with a minus sign, all variables except those listed will be sampled. Wildcards * and ? are allowed.
The default is all variables in the input dataset(s).
If use_badval=yes, the mask value is taken to be the variable's bad value (see datasets), otherwise masksamp prompts for the mask value.
The default is yes.
If use_badval=no, mask_value is the value assigned to the sampled locations.
There is no default.
If mask_inside=yes, the mask value is assigned to points specified by the locations file. If mask_inside=no, the mask value is assigned to all points except those specified by the locations file.
The default is yes.
A possible use of masksamp would be to mask out a user-defined geographical region from a set of registered images. For example, if it was necessary to exclude data from a specific rectangular region in a statistical calculation, one could choose 'select locations' in xvu and produce a locations data set defining the rectangular region. Then masksamp could be run with this locations data set against the datasets which are to have this particular region masked and assign badval to the locations. This will then ensure that these points will be excluded in any subsequent calculation.
datasets, xvu, sample, emath, samplam.
Last Update: $Date: 1999/05/10 20:14:51 $