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