0

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?

4

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())
  • 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

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.