From the course: QGIS and Python for AEC

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Working with projects

Working with projects - QGIS Tutorial

From the course: QGIS and Python for AEC

Working with projects

- [Instructor] In this video, we're going to use Python to modify projects. We're going to open a project, modify it, and save it as a new project file. First, let's open up a blank session of QGIS. You'll notice I have no projects open. We're going to go to plugins Python Console. Make sure we have the editor open and we're going to browse to the first file that's found in our Managing Layers and Projects with Python, PYTHON. And the first one is open project. We're going to use a Python script to open a preexisting project. You may have to change the code a little bit to make sure that it points to the right project. The first thing we do is create a project object called QgsProject.instance. We're creating an instance or instantiating the project so that we can modify it in different ways. The first thing we do is use a QgsProject.instance. Then we use that project object to read in the file. The file we're reading…

Contents