Saturday 20 May 2017

coordinate system - Defining layer CRS and avoiding CRS dialog in PyQGIS?


There is an existing Shapefile, which I want to add.


At the moment my code looks like:


self.iface.addVectorLayer(self.shpFilePath, "Track", "ogr")

It works fine, but i want to define the crs within the code. Is it possible? I found some similar questions like this one: Programmatically Select a CRS in QGIS 2.4 using Python


But i don't get it work anyway.




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...