Thursday, 23 January 2020

qgis - How to avoid the CRS Dialog when creating a vector layer memory?


I am trying to create a vector memory in a plugin. Basing on some examples,I was able to create a memory vector layer and to add it in QGis with : QgsMapLayer.instance().addMapLayer(myLayer,True)


But when the layer is added , QGis always displays the crs dialog to specify the crs of the layers


:crs dialog


I tried to specify myself the crs with : layer.setCrs(QgsCoordinateReference(4326)) but it still shows me the crs dialog.


Do you have any ideas to how avoid this dialog ?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...