-
-
Notifications
You must be signed in to change notification settings - Fork 153
Add DXF export feature #6247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add DXF export feature #6247
Conversation
0b6c987 to
3ada16f
Compare
Implements DXF export functionality allowing users to export the current map view as a DXF file via QGIS Server. Features: - Export UI with scale, symbology mode (symbol layer/feature/none), and layer options - Automatic WFS layer detection (only WFS-enabled layers can be exported) - Filename format: ProjectName_Timestamp.dxf - Preserves layer visibility, opacity, styles, and filters - Custom DXF export icons (white default, dark on hover) Technical improvements: - Refactored into smaller, focused methods for better maintainability - Precise scale calculations with proper geodesic formulas for geographic coordinates - Eliminated code duplication (WFS filtering centralized) - Proper event listener cleanup in disconnectedCallback - Static constants for magic numbers (DPI, conversion factors) - Functional programming patterns where appropriate - Clear separation of concerns (rendering, data collection, export logic) Translations: en_US, de_DE, fr_FR Limitations: - DXF layer order determined by QGIS project configuration Open: - Rights management (ACL2) needs maintainer input
3ada16f to
702e51c
Compare
|
Thanks @meyerlor ! Can you provide a print screen ? |
|
@meyerlor thanks. |
|
@rldhont here a gif recording: One thing really buggers me - i can not control/manipulate the layer order in the resulting dxf, it always seems to be alphabetical. @nboisteault ok, then i will delete the FR/DE translations! |
|
Can you provide some guidance how/if/where some rights-managment should be implemented? I have some time this weekend and would love to advance this (provided you want this functionality?) 😃
|
|
Hi @meyerlor I have imagined to add a config in lizmap-plugin. |
|
I guess this fixes also 3liz/qgis-wfsOutputExtension#27 |
Implements user group restrictions for DXF export functionality based on configuration from the QGIS plugin. Client-side controls: - Only display DXF export minidock when dxfExportEnabled is true - Check user group membership against allowedGroups configuration - Hide UI completely if user lacks access permissions Server-side validation: - Validate DXF export requests in GetMap controller - Check dxfExportEnabled flag from project configuration - Verify user belongs to allowedGroups (if specified) - Return 403 Forbidden if user lacks permission Configuration options (from .qgs.cfg): - options.dxfExportEnabled (boolean): Enable/disable globally - options.allowedGroups (string): Comma-separated group IDs Empty or unset: all users can export (when enabled) Non-empty: only users in specified groups can export Implementation details: - Handles both JSON boolean and string boolean values correctly - Uses is_bool() check before string comparison to avoid type issues - Enforces same access policy on both frontend and backend - Translations managed via Transifex (English only in source)
44d4d56 to
b59f674
Compare
|
@gioman yes, exactly! @nboisteault i removed the translations I did open a PR to the lizmap-plugin: 3liz/lizmap-plugin#666 A working, installable release with the functionallity implemented (and the rights-managment which will be written into the .qgs.cfg with the plugin) can be downloaded here: |

Implements DXF export functionality allowing users to export the current map view as a DXF file via QGIS Server.
Features:
Export UI with scale, symbology mode (symbol layer/feature/none), and layer options
Automatic WFS layer detection (only WFS-enabled layers can be exported)
Filename format: ProjectName_Timestamp.dxf
Custom DXF export icons (white default, dark on hover)
QGIS Server FORMAT_OPTIONS support (MODE, SCALE, FORCE_2D, NO_MTEXT, USE_TITLE_AS_LAYERNAME)
Translations: en_US, de_DE, fr_FR
Limitations:
Needed/ToDo
Would love to see this in future lizmap versions - this is just a demonstration/draft. I'm happy to discuss how to advance this. Specific points needing some input are:
A working release:
lizmap-web-client-3.11.0-DXF-export.zip
As requested here:
3liz/qgis-wfsOutputExtension#27