Created
July 17, 2024 21:34
-
-
Save iliasmachairas/d73bf4162b742e2b9acf2c4dbc1339b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path_shp = "F:\\Tutorials\\Layout_plot_qgis\\periphereies (1)\\periphereies\\periphereies.shp" | |
prefectures = QgsVectorLayer(path_shp, 'prefectures', 'ogr') | |
prefectures.loadNamedStyle(style_prefecture_path) | |
if not prefectures.isValid(): | |
print("Layer failed to load!") | |
else: | |
QgsProject.instance().addMapLayer(prefectures) | |
individual_prefecture = QgsVectorLayer(filepath, filename_without_extension, 'ogr') | |
if not individual_prefecture.isValid(): | |
print("Layer failed to load!") | |
else: | |
QgsProject.instance().addMapLayer(individual_prefecture) | |
individual_prefecture.loadNamedStyle(style_indiv_prefecture_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment