Skip to content
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

Add geometry column to csv export vector layer. #965

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions g3w-admin/qdjango/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1367,8 +1367,8 @@ def test_download_vector_api_selected_wms_fields(self):

fields = [f for f in vl.fields()]

self.assertEqual(len(fields), 1)
self.assertEqual(fields[0].name(), 'NAME')
self.assertEqual(len(fields), 2)
self.assertEqual(fields[1].name(), 'NAME')

# TEST API GPX DOWNLOAD
# ==============================================
Expand Down
1 change: 1 addition & 0 deletions g3w-admin/qdjango/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,7 @@ def response_csv_mode(self, request):
save_options = QgsVectorFileWriter.SaveVectorOptions()
save_options.driverName = 'csv'
save_options.fileEncoding = 'utf-8'
save_options.layerOptions = ['GEOMETRY=AS_WKT']

# Set attributes
self._set_download_attributes(qgs_request, save_options)
Expand Down
Loading