QGIS-Documentation
QGIS-Documentation copied to clipboard
Create DXF blocks for point symbols with data defined properties (Request in QGIS)
Request for documentation
From pull request qgis/QGIS#56428 Author: @mhugent QGIS version: 3.36
Create DXF blocks for point symbols with data defined properties
PR Description:
Referencing repeated point symbols as blocks is perhaps the most effective way to reduce the size of a dxf export file. At the beginning, this was done only if a symbol layer did not contain any data defined properties. Later, it has been extended to use blocks also if size and/or rotation are data defined. This PR adds the capability to build blocks also if other properties are data defined. In practice, it is often the case that only a limited number of attribute combinations occures or that certain attribute combinations are used for many features. Therefore with the new feature existing attribute combinations are detected (by creating a hash over the data defined attributes except size/orientation) and written as block. When the features are written, this hash is compared to find the corresponding block.
In the worst case, the data defined attributes of each feature are unique and each block would only be used once. In this case, the file size would be larger, as creating and referencing a block has a slight overhead compared to write one point symbol inline. Therefore, the feature to build data defined block symbols is disabled by default and can be switched on by layer (in the dxf export dialog). Additionally, is is possible to limit the number of blocks per symbol layer (-1 means no limitation). If the limit is e.g. 5, then only the 5 blocks with the highest number of references are created and the other symbols are written inline.
Commits tagged with [need-docs] or [FEATURE]
"[FEATURE]: build marker symbol blocks also if there are data defined properties"