GEO (bucket function)
The GEO generation function generates a location value based on latitude/longitude coordinates.
The input for the GEO generation function must come from an attribute standardized by the GEO standardization function. See the standardization function GEO (standardization function) for the details of the input and standard formats. The GEO generation function can be used only with the ATTR bucketing function.
Dvdargs are:
- Precision - specified as a number of decimal places
- Neighbor generation - specified as NEIGHBORS
The GEO generation function operates by reducing the resolution of location coordinates so that locations that are close together will generate the same bucket values. The resolution is controlled by specifying the number of fractional digits to preserve in the coordinates (fractional degrees). Input values are truncated to this number of digits by rounding. The default resolution is two decimal digits. The resolution can be changed by providing an argument with the number of digits wanted.
This approach creates a “grid” with the given resolution. Since some locations might be close to the edges of this grid, it can be desirable to generate multiple bucket values for a single location that include neighboring grid locations. This is accomplished by generating bucket values not only for the original location, but also for the locations that are plus or minus one resolution unit in both latitude and longitude. For example, the location N30.301 W97.697 would generate the following bucket values:
N30.30 W97.70
N30.31 W97.70
N30.29 W97.70
N30.30 W97.71
N30.30 W97.69
By default, neighboring buckets are not created. To enable generation of neighboring buckets, include a dvd argument named “NEIGHBORS”.