Syntax @MGRS(TO_MGRS, , , , [x, y]) @MGRS(FROM_MGRS, , , , [x, y]) Arguments Any Ellipsoid name supported by FME The Ellipsoid used for the conversion to or from MGRS. WGS84_LETTERING | BESSEL_LETTERING The type of lettering used Integer from 0 to 5 (inclusive) The number of digits used for eastings and northings in the MGRS code. A precision of 5 locates a point within 1 meter. MGRS String An MGRS code used to convert to lat/long coordinates. [x, y] In the TO_MGRS case, these parameters are the lat/long coordinates used for the conversion to MGRS code. In the FROM_MGRS case, these parameters are used as the names of the attributes that will store the lat/long coordinates once the MGRS code is converted. Note: These parameters must BOTH be used or BOTH not used. Passing in only one of the parameters will result in an error. Range: ( x in [-180, 180] and y in (-90, 90) ) or (String, String) Description This function converts between latitude / longitude coordinates and Military Grid Reference System (MGRS) code. It behaves differently depending on whether the optional parameters are included. The Military Grid Reference System (MGRS) is an extension of the UTM system. The MGRS code for a position consists of a group of letters and numbers which include the following elements: The Grid Zone Designation. The 100,000-meter square letter identification. The grid coordinates (also referred to as rectangular coordinates); the numerical portion of the reference expressed to a desired refinement. A reference is written as an entity without spaces, parentheses, dashes, or decimal points. Examples: 18S (Locating a point within the Grid Zone Designation) 18SUU (Locating a point within a 100,000-meter square) - Precision of 0 18SUU80 (Locating a point within a 10,000-meter square) - Precision of 1 18SUU8401 (Locating a point within a 1,000-meter square) - Precision of 2 18SUU836014 (Locating a point within a 100-meter square) - Precision of 3 18SUU83630143 (Locating a point within a 10-meter square) - Precision of 4 18SUU8362601432 (Locating a point within a 1-meter square) - Precision of 5 In the TO_MGRS conversion, there are two major cases: If the x and y (optional) parameters are NOT passed in, then the coordinates that will be used in the conversion to an MGRS code are those of the feature. Note: If a non-point feature (i.e. a feature with more than one coordinate) is passed in, then the first point in the data will be used for the conversion. If the x and y (optional) parameters ARE passed in, then the values of these parameters are the lat/long values that will be used to calculate the MGRS code. In both of the above cases, the MGRS code is the return value of the function. In the FROM_MGRS conversion, there are, again, two major cases: If the x and y (optional) parameters are NOT passed in, then the feature will be set to be a point at the lat/long values obtained from the MGRS code. The point's coordinate system is set to be the one that was passed in to the function. If the x and y (optional) parameters ARE passed in, then the values of these parameters will be used as the names of the attributes that will hold the converted lat/long values. The only change to the feature is the addition of these attributes. In both of the above cases, the function returns no value. Note: Conversion to and from MGRS may cause some shift, but only the first time. Rounding of the results to some known amount of precision may be desired (only when converting from MGRS back to lat/long).