
There are two reference systems defined by section 5.2.4: an Internal Spatial Reference System and an External Spatial Reference System. The Raster Modules provide two additional reference systems: the Raster Object Scan Reference system and the Layer Scan Reference system. The following definitions summarize these four reference systems:
The remainder of this annex discusses the parameters necessary to perform the transformations of layer coordinates to raster object coordinates, and subsequently to internal coordinates.
The definitions in section G.1 require that each Cell Value be assigned a Layer Coordinate before the Cell Value can be registered to the Internal Reference system. To assign a Layer Coordinate to every cell of the layer requires knowledge about the sequence in which Cell Values will occur within the Cell Record. Basically, an n-dimensional array space must be mapped into a linear sequence. The method used by this standard to specify this order uses a conceptual structure called a cartesian label. The cartesian label is derived from parameters found in the Internal Spatial Reference, Dimension Definition, Raster Definition and Layer Definition modules. When the Cartesian product is performed on a cartesian label, an ordered list, composed of unique indexes, will be generated (see Part 3, 6.1.4, Order of Data Items in Arrays). The indexes generated in this fashion can be directly mapped to Layer Coordinates.
The two ordered sets, the sequence of Cell Values in a module record and the list of indexes (labels) from the cartesian product, can be matched up item for item---thus assigning an n-dimensional coordinate to every Cell value. The Layer Coordinate for the first Cell Value of the Cell Record is encoded in the Cell Record. The Layer Coordinate for the first Cell Value can be mapped to an index located in the list of indexes, called the Primary Index. All Cell Values following the first Cell Value can be matched to indexes following the Primary Index. Each Cell record will need a separate Primary Index to locate the first Cell Value of the record. Mapping indexes to Layer Coordinates and back is discussed in section G.3.
The Cell Values of an n-dimensional array are stored linearly in the repeating Cell Values field of the Cell module. The collection of Cell Values for a layer may be encoded in one record or in multiple records, but the order Cell Values are encoded within the Cell record is defined by the cartesian label. The cartesian label defines the cartesian coordinate system called the Layer Scan Reference system.
The cartesian label defines the Cartesian coordinate system by specifying the number of dimensions, the extent of each dimension and the order of expansion when the cartesian product is taken. Changing the order of repetition for the Dimension ID fields will change the cartesian label generated. The X, Y, and, if needed, Z dimensions will always be the last dimensions of the cartesian label.
The cartesian label is composed of multiple vector labels. Each vector label essentially labels one dimension of the Layer Scan Reference System, thus a four dimensional raster will have a cartesian label composed of four vector labels. The vector label is composed of simple labels. Each simple label provides a value for a position along the dimension. To clarify we will use the following notation:
m = total dimensions geospatial and nongeospatial. This count is derived from the Internal Spatial Reference record referenced by RSDF/ISID. The number of dimensions will be two or greater. The Internal Spatial Reference record can be used to find the number of dimensions as follows: m = 2 + (1 if Z used) + (# of repetitions of the IREF/DMID field) n = a unique value used to identify a specific dimension of the raster. NOTE: the first two dimensions will always be the geospatial dimensions X and Y respectively and if the geospatial dimension Z is used then the Z dimension will be the third dimension. If the Z dimension is not used, then the third dimension will be the first nongeospatial dimension. All nongeospatial dimensions will appear after the geospatial dimensions, and the order the nongeospatial dimensions appear will be dependent on the order Dimension ID fields repeat in the Internal Reference Record for the raster object in question. X dimension or Column of the raster - n = 1 Y dimension or Row of the raster - n = 2 Z dimension or Plane of the raster - n = 3 (when the Z dimension is used) the first IREF/DMID - n = 3 (when Z is not used) or 4 (when Z is used) the second IREF/DMID - n = 4 (when Z is not used) or 5 (when Z is used) . . . the last IREF/DMID - n = m en = extent of the layer along dimension n. e1 - LDEF/LDEF/NCOL e2 - LDEF/LDEF/NROW e3 - LDEF/LDEF/NPLA (if the Z dimension is used) e4 - The first repetition of LDEF/LDXT/DEXT e5 - The second repetition of LDEF/LDXT/DEXT . . . em - The last repetition of LDEF/LDXT/DEXT v = an index value used to identify a specific position along the dimension; legal values will be integers from 1 to en for a given dimension n. slv n = simple label located at index v along dimension n. if LDEF/LDEF/SORI is 0 then slvn = v-1 if LDEF/LDEF/SORI is 1 then slvn = v vln = vector label for the nth dimension, composed of en index values. = sl1 n!sl2 n! ... !sl(en-1) n!sle2 n cl = cartesian label for the Layer Scan Reference System, composed of m vector labels, one for each dimension. The order vector labels are placed in the cartesian label is defined as follows: Right most three vector labels will be for the geospatial dimension X, Y and Z. The order the X, Y and Z vector labels will appear in the Cartesian label will be dependent on the value of the RSDF/RSDF/FSCN subfield. The FSCN subfield indicates which of the three dimension proceeds first, which proceeds second and which last. The dimension to proceed first will be the last vector label to appear in the cartesian label. The dimension to proceed second will be the second from last vector label in the cartesian label. And the dimension to proceed last will be the third from the last vector label in the cartesian label. If the Z dimension is not used, then no vector label will be present in the cartesian label for the Z dimension. NOTE: The raster modules uses the term column for the X dimension, row for the Y dimension, and plane for the Z dimension, all other dimensions are termed as they appear in the Dimension Definition record. The remaining vector labels will be ordered based on the order of repetition of the IREF/DMID field. The dimension referenced by the last DMID field will have the first vector label in the cartesian label. The next to last DMID field will have the second vector label in the cartesian label. etc... = vlm*vl(m-1)* ... *vl1*vl2 (This cartesian label shows an order where the RSDF/RSDF/FSCN is equal to 'R') If RSDF/RSDF/FSCN is equal to 'C' then the last two vector labels would have been switched. For an example, see Part 3, 6.1.4, Order of Data Items in Arrays. After performing the substitutions, the syntax for the cartesian label is as follows: cl = sl1 m!sl2 m! ... !slem m*sl1 m-1!sl2 m-1! ... !slem-1 m-1* ..... *sl1 1!sl2 1! ... !sle1 1*sl1 2!sl2 2! ... !sle2 2 Expanding the cartesian label will yield an ordered list of indexes found in Table 68.
The indexes generated in the table above are not in the correct order to be used as a Layer Coordinate. The indexes must be mapped as follows to generate a Layer Coordinate:
dn = an integer index along dimension n, an element of the Layer coordinate. Layer Coordinate elements, when derived from a cartesian label index: d1 - slv 1 d2 - slv 2 d3 - slv 3 d4 - slv 4 d5 - slv 5 . . . dm - slv m Layer Coordinate elements, when deriving the Primary Index. d1 - CELL/CELL/COLI d2 - CELL/CELL/ROWI d3 - CELL/CELL/PLAI ( if the Z axis is used) d4 - the first repetition of CELL/DNDX/ANVL. d5 - the second repetition of CELL/DNDX/ANVL . . . dm - the last repetition of CELL/DNDX/ANVL
Table 68 - List of indexes generated by taking the cartesian product
Repetition No.
Index
When more than one layer is encoded into the same Cell Module, assignment of Layer Coordinates will be effected by the Cell Sequencing Code, RSDF/RSDF/CSCD, and sometimes by the order of repetition of the Layer ID fields, RSDF/LYID. For multiple layers to occupy the same cell module four rules must be followed:
LDEF/LDEF/CMNM - Cell Module Name LDEF/LDEF/NROW - Number of Rows LDEF/LDEF/NCOL - Number of Columns LDEF/LDEF/NPLA - Number of Planes LDEF/LDEF/SORI - Scan Origin Row LDEF/LDEF/SOCI - Scan Origin Column LDEF/LDEF/SOPI - Scan Origin Plane LDEF/LDEF/RWOO - Row Offset Origin LDEF/LDEF/CLOO - Column Offset Origin LDEF/LDEF/PLOO - Plane Offset Origin LDEF/LDEF/INTR - Intracell Reference Location LDEF/LDXT - Layer Dimension Extent Field (All repetitions of the repeating LDXT field must be the same for all layers.)
When these conditions are met, the cartesian label will be identical for all interleaved layers. Assigning a Layer Coordinate to the CVLS field, is the same as assigning a Layer Coordinate to all Cell Values of the CVLS field. The process for assigning a Layer Coordinate to the CVLS field is defined in section G.3. Additional restrictions are imposed depending on the Cell Sequencing Code used.
When the layer sequential, GI, sequence code is specified, the Cell Values for each layer will be encoded in separate records. Regardless of how the records are interleaved, each record will have a separate Primary Index, as defined in section G.3. The Primary Index is used with the layers cartesian label to assign Layer Coordinates to each Cell Value.
When the layer interleaved by line, GJ, sequence code is specified, the Cell Values for each layer will be encoded in the same record. All Cell Values for the first layer will be encoded in the first consecutive set of CVLS fields. The Cell Values for each layer will be encoded in consecutive sets of CVLS fields. There is no restriction on how much of the layer is coded in the record, but there must be equal numbers of Cell Values coded in the Cell Record for each layer. This encoding scheme requires the layers to have the same dimensions and they must be coincident with each other.
When the layer interleave by pixel, GL, sequence code is specified, each Cell Values field will contain one cell value from each layer. This encoding scheme requires the layers to have the same dimensions and they must be coincident with each other.
This standard provides the ability to transfer tesserally indexed raster data, but it does not provide the necessary rules for assigning Layer Coordinates to cell values. The responsibility for providing the tesseral indexing rules is left for the data encoder to define. Any data encoder using tesseral indexing will need to consider the parameters used in section G.2 while defining these rules. Once these rules have been established, the Layer Coordinates assigned by the new rules can be used as defined in section G.5. When tesseral indexing is used, the Row Index, Column Index and Plane Index subfields as well as the Dimension Index field of the Cell module can not be used; the Tesseral Index subfield of the Cell module will be used instead.
To give an accurate description of how spatial addresses are assigned to cells the following definitions can be used to transform a layer coordinate from the layer scan reference system to the internal reference system (see Figure 33)
m = as defined in section G.3 n = as defined in section G.3 en = as defined in section G.3 dn = as defined in section G.3. pn = extent of the raster along dimension n. p1 - RSDF/RSDF/CLXT p2 - RSDF/RSDF/RWXT p3 - RSDF/RSDF/PLXT p4 - The first repetition of RSDF/RDXT/DEXT p5 - The second repetition of RSDF/RDXT/DEXT . . . pm - The last repetition of RSDF/RDXT/DEXT rn = the cell size, in Internal Coordinates, along dimension n of the raster. The resolution for the X, Y and Z dimension, found in the Internal Spatial Reference record, will be divided by the Scaling factor, SFAX, SFAY and SFAZ, to transform the resolution from External scale to Internal scale. This assumes the cell size along a dimension is constant. For variable cell size along a dimension see section G.6. r1 - IREF/IREF/XHRS divided by IREF/IREF/SFAX r2 - IREF/IREF/YHRS divided by IREF/IREF/SFAY r3 - IREF/IREF/ZHRS divided by IREF/IREF/SFAZ (if Z axis is used) r4 - the DMDF/DMDF/DRES pointed to by the first repetition of IREF/DMID r5 - the DMDF/DMDF/DRES pointed to by the second repetition of IREF/DMID . . . rm - the DMDF/DMDF/DRES pointed to by the last repetition of IREF/DMID sn = indicates if the Layer Scan Reference origin for dimension n starts at zero or one. If the value is zero then the dimensions Layer Scan Reference system starts at zero. If the value is one then the dimensions layer scan reference system starts at one. These values are derived from the following locations: s1 - LDEF/LDEF/SOCI s2 - LDEF/LDEF/SORI s3 - LDEF/LDEF/SOPI (if Z axis is used) s4 - the first repetition of LDEF/LDXT/SODM s5 - the second repetition of LDEF/LDXT/SODM . . . sm - the last repetition of LDEF/LDXT/SODM on = an Internal Coordinate value which locates the origin of the Raster Object Reference system along dimension n. o1 - RSDF/SADR/X o2 - RSDF/SADR/Y o3 - RSDF/SADR/Z (if the Z axis is used) o4 - RSDF/SADR/<subfield for first nongeospatial dimension> o5 - RSDF/SADR/<subfield for second nongeospatial dimension> .. . . om - RSDF/SADR/<subfield for last nongeospatial dimension> tn = integer translation value to move dimension n of the Layer Scan Reference system origin to the Raster Object Scan Reference system. t1 - LDEF/LDEF/CLOO t2 - LDEF/LDEF/RWOO t3 - LDEF/LDEF/PLOO (if the Z axis is used) t4 - the first repetition of LDEF/LDXT/DTOO t5 - the second repetition of LDEF/LDXT/DTOO . . . tm - the last repetition of LDEF/LDXT/DTOO cn = the Internal Coordinate value which locates index dn along dimension n an = a value, +1 or -1, indicating the orientation of the Raster Object Scan Reference origin with respect to the Internal Reference Origin for the dimension n. A positive one indicates the raster object scan reference axis and the internal reference axis are oriented the same way. A minus one indicates the two axes are oriented opposite ways. if RSDF/RSDF/SCOR indicates Left, a1 = +1 if RSDF/RSDF/SCOR indicates Right, a1 = -1 if RSDF/RSDF/SCOR indicates Top, a2 = -1 if RSDF/RSDF/SCOR indicates Bottom, a2= +1 if RSDF/RSDF/SCOR indicates Z runs negative to positive, a3 = +1 if RSDF/RSDF/SCOR indicates Z runs positive to negative, a3 = -1 the first repetition of RSDF/RDXT if DSCO = PN, value for dimension 4, a4 = -1 if DSCO = NP, value for dimension 4, a4 = +1 the second repetition of RSDF/RDXT if DSCO = PN, value for dimension 5, a5 = -1 if DSCO = NP, value for dimension 5, a5 = +1 . . . the last repetition of RSDF/RDXT if DSCO = PN, value for dimension m, am = -1 if DSCO = NP, value for dimension m, am = +1 R = a vector representing the Internal Reference system cell sizes for all dimensions, derived from the records pointed to by the Internal Spatial ID field of the Raster Definition module. [r1 r2 r3 r4 r5 . . . . . rm ] S = a vector where each value is zero or one. [ s1 s2 s3 s4 s5 . . . . . sm ] D = a vector representing a integer index into the Layer Scan Reference system, usually derived when a Cell Value's index is needed. Every Cell record has a Layer Coordinate, D, to locate the first cell of the record. [d1 d2 d3 d4 d5 . . . . . dm ] O = a vector representing the Internal Coordinate of the Raster Object Scan reference system origin, derived from the SADR field in the Raster Definition module. [o1 o2 o3 o4 o5 . . . . . om] T = a vector used to translate the Layer Scan Reference system to the Raster Object Scan Reference system. [t1 t2 t3 t4 t5 . . . . . tm ] A = a vector representing the location of the Raster Object Scan Reference system origin with respect to the World Coordinate origin. [a1 a2 a3 a4 a5 . . . . . am ] Rd = mxm diagonal matrix where the values of the vector R are along the diagonal. Ad = mxm diagonal matrix where the values of the vector A are along the diagonal. C = the resultant vector for the Layer Coordinate D. This vector is also known as the Spatial Address for the Layer Coordinate D. The vector C is defined by the following matrix formula: = O + ( D - S + T ) * Rd * Ad
When the default implementation is used for the Object Representation Code, G2, the formula for C is defined as follows (See 5.7.5, Default Implementation):
m = 2 O = derived as indicated above. [ o1 o2 ] T = [ 0 0 ] D = derived as indicated above. [ d1 d2 ] S = [ 0 0 ] R = derived as indicated above [ r1 r2 ] A = [ +1 -1 ] Rd = derived as indicated above Ad = derived as indicated above C = the same as above, but we can simplify it because of the default values: = O + D * Rd * Ad
This standard allows one or more dimensions of a raster to be labeled, when the resolution for the dimension is not constant. When an axis is labeled each position of the axis in the Raster Object Scan Reference system will have one label indicating where the corresponding position lies in the Internal Reference system. If a dimension requires labeling, then the resolution for the labeled dimension will be set to zero. The geospatial dimensions, X, Y and Z, can be labeled, but the labels must match the format defined by the raster's Internal Reference record. The nongeospatial dimensions can be labeled, but the labels must match the format defined by the dimension's Dimension Definition record. The labels will be stored in the repeating fields, each dimension will be labeled in a specific field (see Table 69).
If the Z dimension were labeled, the IREF/IREF/ZRES would be zero and there would be RSDF/RSDF/PLXT repetitions of the RSDF/ZXLB field. Each ZXLB field would contain a label for the corresponding position along the Z dimension of the Raster Object Scan Reference system.
To use the labels, perform the calculations as defined in section G.3 and then for the dimensions with a zero resolution, a label will have to be placed in the corresponding dimension of the C vector. The following formula can be used.
cn = LBLn (dn=0n)
If the nth dimension's resolution is zero, the value for cnth element of the C vector will be the (dn+on)th label of the nth dimension's list of labels.
Dimension | Field with labels located in it | Subfield containing the Label Field's Number of Repetitions | Notation used when referencing the label. |
|---|---|---|---|
RSDF/ZXLB1 | |||
| 1 |
|
U.S. Department of the Interior
|| U.S. Geological Survey 1400 Independence Road, Rolla, MO 65401 For general information call: (573)308-3500 URL: http://mcmcweb.er.usgs.gov/sdts/SDTS_standard_nov97/part1an6.html Last modified: Monday, 14-Jan-2013 19:27:46 EST Maintainer: mcmcweb@usgs.gov Privacy Statement || Disclaimers || FOIA || Accessibility |