Bug report #19451

GDAL Import vector into PostGIS

Added by Stephen Knox over 2 years ago. Updated over 2 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Processing/GDAL
Affected QGIS version:3.3(master) Regression?:No
Operating System:Windows 10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27279

Description

When using seemingly any vector layer in v3 the data source is not automatically populated, and instead path_to_data_file layer_name are populated in the GDAL command which is the default.

I've investigated this and come up with a patch which I will share, probably on GitHub, but I don't know enough about the "right" way to do it.

Associated revisions

Revision ed94b693
Added by Nyall Dawson over 2 years ago

[processing][gdal] Fix layer paths are sometimes incorrect within command preview

Fixes #19451

Revision 27d447b7
Added by Nyall Dawson over 2 years ago

[processing][gdal] Ignore 'selected features only' setting when
creating command preview

Since this has no meaning outside of a QGIS session

Refs #19451

Revision 9ba794c1
Added by Nyall Dawson over 2 years ago

[processing][gdal] Fix layer paths are sometimes incorrect within command preview

Fixes #19451

(cherry-picked from ed94b69)

Revision 3d3be641
Added by Nyall Dawson over 2 years ago

[processing][gdal] Ignore 'selected features only' setting when
creating command preview

Since this has no meaning outside of a QGIS session

Refs #19451

(cherry-picked from 27d447b79)

History

#1 Updated by Giovanni Manghi over 2 years ago

  • Status changed from Open to Feedback
  • Category changed from Python plugins to Processing/GDAL

What exact tool is this ticket about? Patches are welcome, and the right place where to submit them is on Github. Thanks!

#2 Updated by Stephen Knox over 2 years ago

Sorry, that will teach me to write tickets in the early hours. It should say GDAL Import vector into PostGIS. Can someone change the title?

But it is specifically the code in python/plugins/processing/algs/gdal/GdalAlgorithm.py getOgrCompatibleSource(...) that I think needs changing as it doesn't return addressable data source objects for layers so obviously can't write those out in text format for ogr2ogr. I think that probably affects multiple plugins.

#3 Updated by Giovanni Manghi over 2 years ago

  • Subject changed from GDAL Import vector into QGIS to GDAL Import vector into PostGIS
  • Status changed from Feedback to Open

#4 Updated by Nyall Dawson over 2 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF