changeDataSource plugin release 1.0

the new qgis plugin allows to change the datasource of layers already loaded preserving all properties and settings (symbology, labels, joins, relations) using methods already exposed. The plugin operates in two operating modes: per layer or per project. In the first way it is possible to operate directly on layer right clicking on legend items, modifying the datasource type and string and applying the edits.

Screenshot 2015-09-30 20.25.02Screenshot 2015-09-30 20.29.09

in the second way clicking on toolbar icon, the plugin exposes on an editable table datasource types and connection strings for all the loaded layers allowing global edits with a find and replace function or a direct edit on the cells. Datasource are not modified directly; modified cells are marked in yellow and the edits have to be applied to be effective, and visible on map canvas. Valid edits are marked in green while the invalid ones in red.

changeDataSource1

Download plugin

Advertisements

13 comments

  1. Pingback: changeDataSource plugin release 1.0 for QGIS | GeoNe.ws
  2. Baswein

    Enrico, Thanks for the great plug-in. Efforts like yours seem to be what keeps QGIS thriving. Now if the “handle bad layers” would let me save the layers to reconnect latter with your plug-in when I am back on the network. That would be even better.

    • enricofertest

      I am happy to know you find it useful. “Handle bad layers” is a core feature that I don’t figure how to manage it in a plugin. Maybe intercepting project reading layer signal… I promise I will have a look.
      I was expecting to change datasources from property dialog for a long time, so I decided to write it by myself, but it would be a nice new core feature.

    • Baswein

      Thanks! I installed it. I experimented a little with a shape file by moving the shape file and all it’s associated fils to a subfolder. It moved the layer to the unhandled layer (great). When I reconnected the file with the global toolbar icon it told me that my shape file was the wrong file type. When I reconnected using the right click method it reconnected fine. I did lose my styles that I had set up for the layer is that normal? Thanks for doing all of this!

    • enricofertest

      Yes. It should be possible, as any other datasource, but, at the moment, I have not a testing mysql db server to verify it.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s