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.

Converting lines to polygons with Python

Converting lines to polygons with Python - QGIS Tutorial

From the course: QGIS and Python for AEC

Converting lines to polygons with Python

- [Instructor] Next, we're going to look at how to convert polylines into polygons. After importing DXF or DWGs into your project, you'll find that even in closed P lines, now a closed p-line is a polyline that closes in on itself, is treated at a polyline and not as a polygon, even though AutoCad users often refer to polygons by the closed p-line object. So in our Importing DWG/DXF folder, right at the root of that, we have a geopackage called Important_Complete. In there, we have some polylines. Just drag and drop that into a new project. You'll notice right away you'll have polylines showing up. It's the downtown area of Parcels. And you'll see the coordinates system automatically changed to EP62910, so we're in the right coordinates system. This is in meters. And this is the downtown section of the city. What I want to do is to be able to convert these polylines into polygons. So I'm going to actually take this…

Contents