Syntax @GOID() @GOID(VERIFY,) Arguments 32-Digit Hexadecimal Number This parameter is used in the second form of @GOID to verify that a GOID is valid. The checksum of the is validated. Description This function calculates a Geographic Object IDentifier (GOID) for the feature it is given, according to the format described later. The GOID is a unique 128-bit number that incorporates the position of a feature with other numbers. The result is a unique value that may be attached to the feature, thereby distinguishing it from any other feature. The first form of @GOID takes no parameters. In this case, it calculates a GOID for the feature, according to the format described later, and returns it as 32 hex digits. There are two forms of the GOID function determined by the number of parameters given. They are: Form 1: @GOID() This form returns a 128-bit GOID for the feature as 32 hex digits in an ASCII string. The first 16 characters correspond to the position, the next 10 to the time, the next 4 to the sequence number, and the final 2 to the checksum. This form operates as an attribute function, because it returns a string. For example, when @GOID was called on a point feature at position (-127,49) as measured in latitude and longitude on January 23, 1997 at 10:39:26 AM PST, it returned the value: 47B21A71B1BCC00013E280E5140000B1 Form 2:@GOID(VERIFY, ) This form verifies the goidValue expressed as a string of 32 hex digits is valid. The verification is done by ensuring the GOID's checksum is correct, according to the specification found below. If the GOID checks out, 1 will be returned, otherwise 0 will be returned. Formal Specification ~~~~~~~~~~~~~~~~~~~~ The GOID is composed of four parts: Part A corresponds to the left-most 64 bits. Part B corresponds to the next 40 bits. Part C corresponds to the following 16 bits. Part D corresponds to the right-most 8 bits. Part A Sixty-four bits are derived from bit interleaving binary representations of the latitude and longitude values. They are initially expressed as double- precision floats. Next, the latitude and longitude are each multiplied by 107. Then each is converted to a signed, four-byte (32-bit) integer. Negative values are handled by two's complement encoding. The interleaving proceeds, from left to right, beginning with the left-most bit of the latitude and then the left-most bit of the longitude. Therefore, from left to right, the odd- numbered bits of Part A of the GOID are from the binary form of the latitude, and the even-numbered bits are from the binary form of the longitude. The GOID provides approximately 1.1 cm precision at the equator for both coordinates. In British Columbia, Canada, the precision of the latitude and longitude are approximately 1.1 cm and better than 0.4 cm, respectively, for a given point defined as: the position of the object, if its geometry is a point, or the weighted average of the first two points encountered in the object's geometric description. In the case of an area feature, the two points come from the outer boundary as measured in a counterclockwise, or left-hand, fashion. The first point has double the weight of the second point to distinguish the traversal direction along the line segment. That is, for both x and y coordinates: new_coordinate = ((2*coordinate_first_point) + coordinate_second_point)/ 3 Part B Forty bits represent time as measured in hundredths of a second, as read from the computer's clock. The time is measured with respect to Universal Coordinated Time (UTC), also known as Greenwich Mean Time (GMT), with a zero time of 00h00m00s, January 1, 1970, but unadjusted for leap seconds. Part C Sixteen bits are used as an arbitrary sequence number to avoid the possibility of two objects at the same place being defined in the same hundredth of a second. The sequence number is reset to zero with each FME run. Part D Eight bits are used as a checksum. For the purpose of this (Part D) calculation only, the highest four bits, bits 0 through 3, are moved to become bits 116 through 119. That is, the first, or left-most, hexadecimal digit becomes the 30th hexadecimal digit. The 128 bits are then treated as 16 consecutive, one-byte unsigned integers. The last integer is adjusted so the sum of the 16 integers is 0, modulo 256. This rotation of the first hex digit minimizes the chance that a four, 32-bit integer representation of the GOID could have the position of the integers altered or reversed in some way, thereby remaining undetected. Encoding There are two representations of the GOID: as a character string of 32 hexadecimal digits and as four unsigned, 32-bit integers. The character string is defined from left to right, for Parts A through D, respectively. For each part, the left-most character is treated as the most significant. For Part A, this ensures that the correspondence between the hexadecimal and binary representations is direct. Conversion from the ASCII representation to four 32-bit base-10 integers proceeds from left to right. The left-most 8 characters define the first integer, and so forth. Also, the left-most character in each group of 8 characters represents n * 167, the next represents m * 166, and so on for the remaining characters.