Open aeduard opened 3 years ago
I guess that would need to be added as special case because in QGIS Server this format is part of the WMS getmap request and not of the WFS GetFeature one(?).
I don't understand the differences and details, but it would be a nice feature even today :). We could sponsor the development for this update.
I see "DXF" when right clicking on a layer → "Save features as", so maybe not ? Have you tried to add it ? https://github.com/3liz/qgis-wfsOutputExtension/blob/master/wfsOutputExtension/definitions.py
Have you tried to add it ? https://github.com/3liz/qgis-wfsOutputExtension/blob/master/wfsOutputExtension/definitions.py
@Gustry I added
Dxf = Format(
content_type='application/dxf',
filename_ext='dxf',
force_crs=None,
ogr_provider='AutoCAD DXF',
ogr_datasource_options=(),
zip=False,
ext_to_zip=(),
)
but resulting file is 0 bytes.
Looks like the driver short name is used for ogr_provider, you could try:
ogr_provider='DXF'
Looks like the driver short name is used for ogr_provider, you could try:
nope, still 0 bytes.
Thanks for checking, indeed, it's in the documentation :
https://docs.qgis.org/3.28/en/docs/server_manual/services/wms.html#wms-getmap-format
So WMS GetCapabilities in WMS is missing the DXF format if the layer is also in WFS ?
So WMS GetCapabilities in WMS is missing the DXF format if the layer is also in WFS ?
DXF is part of the WMS capabilities regardless if a layer is published as WFS (as far as I understand)
DXF is part of the WMS capabilities regardless if a layer is published as WFS (as far as I understand)
no you are right, only when the layer is published as WFS.
The dxf-export in Qgis (in server through wms-request) does not save feature attributes.
The dxf-export in Qgis (in server through wms-request) does not save feature attributes.
@huggla sure you did the request correctly? This with the demo project (Montpellier) worked for me
https://github.com/3liz/qgis-wfsOutputExtension/issues/27#issuecomment-1784803518
The dxf-export in Qgis (in server through wms-request) does not save feature attributes.
@huggla sure you did the request correctly? This with the demo project (Montpellier) worked for me
Normal WMS request: https://kartor.kristianstad.se/qgisserver-shared/ows/planer?with_geometry=true&fi_point_tolerance=20&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&FORMAT=image/png&LAYERS=v_planer_lk&WIDTH=512&HEIGHT=512&SRS=EPSG:3008&BBOX=191093.75999999995%2C6211571.84%2C191237.11999999994%2C6211715.2 Feature attributes: https://kartor.kristianstad.se/qgisserver-shared/ows/planer?REQUEST=GetFeatureInfo&QUERY_LAYERS=v_planer_lk&SERVICE=WMS&VERSION=1.1.1&INFO_FORMAT=application/json&X=266&Y=229&WIDTH=512&HEIGHT=512&SRS=EPSG:3008&BBOX=191093.75999999995%2C6211571.84%2C191237.11999999994%2C6211715.2 DXF export (feature attributes missing): https://kartor.kristianstad.se/qgisserver-shared/ows/planer?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=v_planer_lk&WIDTH=512&HEIGHT=512&SRS=EPSG:3008&BBOX=191093.75999999995%2C6211571.84%2C191237.11999999994%2C6211715.2&FORMAT_OPTIONS=MODE:SYMBOLLAYERSYMBOLOGY;SCALE:500;NO_MTEXT:TEXT&FILE_NAME=planer.dxf&FORMAT=application/dxf Geojson export (with feature attributes): https://kartor.kristianstad.se/qgisserver-shared/ows/planer?REQUEST=GetFeature&TYPENAME=v_planer_lk&SERVICE=WFS&VERSION=1.0.0&OUTPUTFORMAT=geojson&WIDTH=512&HEIGHT=512&SRSNAME=EPSG:3008&BBOX=191093.75999999995%2C6211571.84%2C191237.11999999994%2C6211715.2
I've tried the setup in definitions.py (version 1.8.0), also layer is published in QGIS Server WFS capabilities. The resulting dxf has 0 bytes. Any hints?
Any hints?
@aeduard it won't work, as far as I understand, because the DXF is part of QGIS WMS capabilities, not WFS.
Extend export format types with dxf.