changeDatasourcePlugin plugin release 2.0

The plugin has received several main improvements and minor changes:


  1. Data sources browsing
  2. Bad Layers Handling
  3. Expression driven data sources replace

Data source browsing


New data source selection can now be performed by a Qgis browser widget between those currently available.  Clicking on browse button in the contextual windows or in in the datasources tables now appears Qgis browser instance where can be specified the new datasource to apply.

Bad Layers Handling

This feature has been developed thanks to Baswein suggestions who contributed with a precious and accurate plugin testing during development.

The plugin can handle bad layers replacing the standard bad layer manager with the datasources table. The new feature has been developed thanks to The standard bad layer manager allows to fix only at the opening of the project.


If not reconciled at the opening of the project, bad layers and their related settings (for example symbologies, labels, joins …) are definitively lost. Furthermore datasources browsing is allowed only for file datasources (OGR and GDAL). For other datasources the only way is to manually modify connection string.

The new feature allows to specify bad layers with missing datasources later, during qgis project session, specifying them with the same plugin methods.

The bad layers handling have to be activated checking “Handle bad layers” checkbox located at the bottom of the main plugin dialog, and restarting QGis.cds2.png

Once activated the improved Bad Layers Handling, if missing datasources are detected the following dialog appears after loading the project.cds4
The dialog notifies that the bad layers are now handled by changeDatasource plugin.

The bad layers awaiting to be reconciled are keeped with all their properties and settings under the “unhandled layers” group located at the bottom of legend tree.

Bad layers are reconciled specifying a new valid and compatible datasource with the contextual dialog or by the datasources table. Unhandled layers are marked with light brown backgroundcds5
If successfully reconciled the layers are moved from the “unhandled layers” group to their original legend position, preserving in this way the right project draw order.

Expression driven data sources table replacing

The datasource table dialog allows a new method for massive change of layers datasources using expressions. The well known widget can be used to rewrite the datasources using layers properties (filename, data type, provider, geometry type ….) as fields:


Download the plugin



  1. Pingback: QGIS changeDatasourcePlugin plugin release 2.0 –
    • enricofertest

      Yes, but I have not yet planned the migration. Sincerely, I would not waste my time with a QGIS3 release and then find the feature in QGIS3 core but now we should be in freeze phase and apparently nobody feels the need…

      • Rob Willson

        not sure why this capability would not have been added to QGIS3 core, it is a great plugin and without it I’m not sure how one would change datasources of multiple layers at the same time. Similarly, do you have any plans to port PickLayer over to QGI3 – another one of my favorites!

  2. Rob Willson

    so painful to use QGIS 3 without change datasource and picklayer plugins. I guess that’s what happens when you become used to the functions made available with those plugins and use them everyday. Have you been able to make any progress on porting them to Q3?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s