...
Create a Stored Procedure Task in Studio and select the Function at_wkf_geopivot_sum.
Now select each parameter in turn to enter the values in the Edit parameter area e.g.
...
Parameter | Type | Description |
---|---|---|
geometry_table | character varying | The table of polygons to use for the data aggregation, all the columns in this table will be replicated in the output table. |
geometry_id_column | character varying | A column in geometry_table that uniquely identifies the records. |
data_table | character varying | The table containing records with point geometry and category. |
category_column | character varying | The column in data_table to be used to categorize the data. |
output_table | character varying | The table to create with the counted and pivoted data, if it exists it will be dropped first. |
Create a Stored Procedure Task in Studio and select the Function at_wkf_geopivot_count.
As with at_wkf_geopivot_sum these parameters should be listed in comma-delimited form in Studio select each parameter in turn to enter the values in the Edit parameter area.
If successful, at_wkf_geopivot_count returns the following:
...
Your final table must contain a unique identifier, of data type SERIAL. This is generally called “ogc_fid”. If not already present, this can be added using a Studio Workflow Stored Procedure Task that calls the function Task, selecting the Workflow radio button and then select the at_sys_add_column e.g.
This stored procedure takes the following parameters as shown in the above screenshot:
...
wkf_executecmd entry from the list.
Click on Parameter 1. cmdtexecute and enter the following.
Code Block | ||
---|---|---|
| ||
alter table docs_geopivot_parish add column ogc_fid serial; |