GENERATE_REPORT
The GENERATE_REPORT command allows you to generate a CSV text report file on the data in one or more loaded layers broken down by a particular attribute value, feature name, or type, or just a single line report about all features. The report will include the count of area, line, and point features matching the specified criteria as well as the total combined length of the line features and combined covered area of the area features.
The following parameters are supported by the command:
- OUTPUT_FILENAME - specifies the name of the text .csv file to write the report results to.
- FILENAME - filename of the layer to generate the report for. If an empty value is passed in, all layers that were created by the script, such as those from a GENERATE_CONTOURS command, will be used to generate the report. This parameter can be listed more than once to specify multiple input files, like FILENAME="FILENAME_1" FILENAME="FILENAME_2". You can also pass in the value 'USER CREATED FEATURES' when running a script in the context of the main map view or loading a workspace to have the 'User Created Features' layer be used. If no FILENAME parameter is provided, the report will cover all available vector layers.
- REPORT_ATTR - specifies what to use to divide up the report into categories. See special Attribute Name parameter details. If no REPORT_ATTR parameter is provided or the value is empty, only a single line concerning all matching features will be generated in the report. You can provide multiple REPORT_ATTR parameters if you want to group the results by more than one attribute. For example you might want to separate by layer and type so you could add REPORT_ATTR="<Feature Layer Name>" and REPORT_ATTR="<Feature Name>".
- COMPARE_STR - specifies a comparison operation to perform to see if a feature is one that needs to be included in the report. The format is attr_name=attr_value. For example if you have an attribute named CFCC and you want to match when the value of that attribute starts with an 'A', you can use COMPARE_STR="CFCC=A*" as your parameter. You can add multiple COMPARE_STR parameters to a single command to combine multiple criteria for your search. See special Attribute Name parameter details for special attribute names to compare against.
- CASE_SENSITIVE - specifies whether or not text comparisons are case sensitive or not. Use CASE_SENSITIVE=YES to enable, by default comparisons are not case sensitive.