GeoAggrGeometry - script and chart function
GeoAggrGeometry() is used to aggregate a number of areas into a larger area, for example aggregating a number of sub-regions to a region.
Syntax:
GeoAggrGeometry(field_name)
Return data type: string
Arguments:
Argument | Description |
---|---|
field_name | A field or expression referring to a field containing the geometry to be represented. This could be either a point (or set of points) giving longitude and latitude, or an area. |
Typically, GeoAggrGeometry() can be used to combine geospatial boundary data. For example, you might have postcode areas for suburbs in a city and sales revenues for each area. If a sales person’s territory covers several postcode areas, it might be useful to present total sales by sales territory, rather than individual areas, and show the results on a color-filled map.
GeoAggrGeometry() can calculate the aggregation of the individual suburb geometries and generate the merged territory geometry in the data model. If then, the sales territory boundaries are adjusted, when the data is reloaded the new merged boundaries and revenues are reflected in the map.
As GeoAggrGeometry() is an aggregating function, if you use it in the script a LOAD statement with a Group by clause is required.