1

I have a large project and I recently reorganised my data. This included reprojecting some of it. I have updated the data sources for all of my layers however there are some layers which are still using the old CRS.

Is there a way to identify all layers in my project which are not using the project CRS? Or else to list all layers using a specific CRS?

5

You can run this snippet in Qgis python console, it will print all layers name that have a different CRS than the current project:

layers = QgsProject.instance().mapLayers()

for layer in layers.values():
    if layer.crs() != QgsProject.instance().crs() and layer.dataProvider().name() != 'wms':
        print(layer.name())
|improve this answer|||||
  • Perfect. Thank you. As an extra is there a way to exclude WMS layers? – TeddyTedTed Nov 27 '18 at 11:46
  • 1
    see my edited answer – YoLecomte Nov 27 '18 at 11:51
1

As an alternate to the PyQGIS solution provided, the Layer Board plug-in summarizes key layer attributes across all layers in a table, CRS included. Quite helpful after reorganizing a project since you can see other properties as well, and also remove ghost layers.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.