I'm trying to remember how to do polygons from lines, I remember it was a very simple procedure. have a layer of lines intersecting or touching, use the tool and voila, qgis took the lines layer  and created a layer of polygons  with the spaces between the lines. very simple tool with Polygonize here   However today I try, I can not get a good result. For this exercise I made a layer of lines with different shapes as you can see below.    A= it is a single line that does not close (in the table object id 0)  B= a square with lines in, that joined to form a single object (in table object id 1)  C= a triangle made of different lines that are touching, for this I used the snapping tool (in the table objects id 2,3,4)  This is the result of: vectorial-> Geometry Tools -> lines to polygon    As observed the tool close the object A to forms a good polygon (table object id 0), object B is formed with errors and under a single polygon (table object id 1) and the C object (the triangle) is completely ignored  This is the result of: processing-> vectorial geometry -> lines to polygons    As observed the tool close the object A to forms a good polygon (table object id 0), object B is formed with errors and under a single polygon (table object id 1) and the C object (the triangle) is completely ignored  This is the result of processing-> vectorial geometry -> poligonize    the poligonize tool gives a different result, only a general polygon shape without taking into account the interior lines of the B object and the table is filled with the area and perimeter of this.  As you can see the results are not what I expected, as I recall it was very easy to make and very good results were obtained and usually had to make small adjustments to the polygons.  and I read this answer from 2014:     with a very similar problem where the possibility that the tool is BROKEN , however I dont know if this will be the case or I doing something wrong with the tool  QGIS: 2.14.3  Installer: standalone QGIS-OSGeo4W-2.14.3-1-Setup-x86_64 OS: Windows 10 64bits (1115 10586.318)
120784
In QGIS, I want to make polygons from a set of intersecting lines. Looking at the screenshot here, I want chop the purple line (it's a closed line, not a polygon) where it crosses the green and blue lines. The result hopefully would be a polygon where I have hatched in red. I have quite a few to do.    I have tried the QGIS tool previously called Polygonizer (see ), but now called Polygonize. This is a tool that, given a layer containing a set of crossing lines arranged essentially like a # symbol, should create a polygon from the enclosed space in the middle.  (In QGIS 2.01, Polygonize is in the top menu bar: go to Processing -> Commander, then type "Polygonize" on the command line, select "Processing algorithm: Polygonize" from the list that appears, and press Enter.)   At the momemt Polygonize doesn't work properly. Is there another way to do what I want to do?   For example, wouldn't it be great if the QGIS 'Split Feature' command was able to work like MapInfo's 'Polyline Split', where you select the polygons to split, then select an already-drawn polyline to split by, and voila. But Split Feature seems not to work that way.    UPDATE: Detail of problems with running Polygonize.  I have 64-bit QGIS 2.01 installed to Windows 7 from the installer package, QGIS-OSGeo4W-2.0.1-3-Setup-x86_64.exe.  The routine processed an output from my shapefile, but did not create a polygon from the region enclosed by intersections between the blue, green and purple lines. (Note: in the actual input file, all these lines are on the same layer; the screenshot just colours them differently for illustrative purposes). What I got instead was a simple conversion of the purple outline to a polygon, as though the program completely ignored the blue and green lines.  When I node-edited the closed purple line, to open it so that I had a set of open crossing lines like in the # symbol, and then ran Polygonize again, nothing happened. No crash, but no visible polygon in the output file.    When I used Nick Hopton's own  data, I got a crash; see screenshot:
41713
I have two layers, one (A) has point features and the other (B) has polygons.  How do I produce a new table with some (the ID) or all the fields from the A table and some (the area code) or all from the B table where the B polygon contains the A point?  I am using QGIS.
49766
I am using QGIS 3.2 and I need to create an area to form a polygon shapefile using latitude and longitude, not using Python as I am just a beginner. How to do this?
36290
I'm wondering if there's a way to intersect two polygon layers, take the intersection, and remove that from one of the polygon layers, making a new layer out of whatever is left over? Basically, the idea I have is one of "punching holes" in a map of Africa where the holes are points around which I construct some sort of buffer. I have QGIS and ArcGIS 10.0. Is there a built-in or user created script for this?
7068
I'm using python in QGIS. I have a layer of polygons (its a result of some earlier dissolving and has no overlapping polygons but some holes and islands in holes etc). I want to build a new layer which contains one polygon representing a bbox of the first layer with each polygon cut from it.  Essentially I want to "invert" the layer I have so that where the was polygon, now there is not, and where there was not polygon now there is. All inside a bounding box of the original layer.  I can build a bbox easily and I tried to "subtract" the polygon layer from my new bbox polygon layer but the process slows to a stop and then crashes my PC. Here's the algorythm  processing.runalg("qgis.difference","path/to/polygon.shp","path/to/bbox.shp","path/to/result.shp")   I dont care about attributes (obviously). I just need to cut one set of polygons from one larger polygon.  It seems so simple, I wish I could find a simple command or script to acheive this. As stated at the top I'm looking for a solution in python in QGIS.
113953
I have a road network as line layer and a land cover as polygon layer, I want to find number of subpolygon for each polygon that divided by line layer in QGIS?  I used union function in Geoprocessing Tools in Vector menu of QGIS and then polygonize function to convert union result to polygon but in table of new polygon there is NULL data.
196
I am working with vector polygons that have derived from hand drawn areas from when mapping was carried out with tracing paper over paper maps. Therefore many of the polygons don't exactly line up to the boundaries on the ground.  Another dataset of vector lines I have is accurate and so I have been manually snapping nodes of the polygons to the nodes of the lines. But this is a lengthy process.  Here is a screenshot...    The green line is the accurate dataset. You can see how the polygon boundaries (orange) are roughly correct. Bottom left I have started to edit the nodes, with the snapping options set up, and this works to manually move the nodes of the polygons to snap to the nodes of the line. (Yes, I could have enabled topographical editing to move both the polygon boundaries together, and I do do that).  Is there a method for snapping multiple nodes of the polygon to the nodes of the lines, or is there perhaps a better method of doing this? Using Python perhaps? I am looking for something akin to the 'Enable tracing' function (which is great) but for moving polygon boundaries.  I am aware that this may in places be a duplicate as there are many similar questions, but I haven't quite found anything that answers my particular situation? In particular I have looked at...
16607
I work with this polygon and try to find a way to create a new polygon from the empty gap (not distinguish it) in the middle of the polygon.  I succeed to do it with a "Difference" tool but used with another layer on the polygon and then using the difference tool.  I can also digitize the shape of the hole and create a new layer I seeking an automated way to do it and not doing in manually.   I read:        Is it possible to do it with a direct tool in QGIS 2.18.1, without the aid of another layer?
86699
I use QGIS (2.10.1) to create buffers around polygons.  I often create a series of buffers, and later need to edit the underlying polygons.  It is frustrating to start from scratch in re-create several buffers based on the changes when this happens.  Is there a way to create a 'live' buffer, that will automatically update to changes made to the parent polygon, or as a second best, a means to replicate with one click, the buffer settings and formatting that you originally created?
41338
I am digitising line-features based on WGS-84 point-coordinates from a PDF which cannot be copied from.  The final line layer should contain lines which each connect two points and have the following attributes:   Name of start point - name of end point value in [ft] value in [m] remark (same for all features) date of creation   Currently I have a csv-based point layer which simply contains the name and coordinates of each point.    Creating the point layer is no problem, but creating the lines is a bit of a hassle. Either I manually create a .csv containing all existing connections between points like the following table and run connect by lines:    Or I digitise the lines manually but fill in the values (except for the value in [ft]) automatically.    Personally I would prefer option 2, since option 1 involves more manual work and the process has to be repeated regularly (and I figure I could transfer the solution to other tasks), but I can't get the expression right which should fill in the name of the line. All other values are created flawlessly (though they are not taken from another layer based on geometry).  I added the WKT of each point to the point-layer. Currently I am running the following, which returns NULL, despite it seems to be correct to me:  attribute(get_feature('point-layer','geom',geom_to_wkt(start_point($geometry))),'Waypoint')||' - '||attribute(get_feature('point-layer','geom',geom_to_wkt(end_point($geometry))),'Waypoint')   Any ideas where I went wrong?
97504
I am trying to get the coordinates of each node of a polygon in QGIS. What I basically did is use the following tools:  Vector -> Geometry tools -> Extract nodes  Vector -> Geometry tools -> Export Geometry column  However only around the first 300 points had successfully obtained coordinate values in the new xcoord and ycoord fields. The other three thousand plus points had null values. What can I do to get the other points' coordinates? Also is there an easy way to get the point order of each node?
84377
I'm trying to figure out how to create a polygon that connects all the endpoints of a shapefile containing a set of polyilnes with pythonscript in ArcGIS, I'm having trouble doing this as the order of the nodes in the polygon is important. I want to achieve the grey polygon in the picture from the green lines
78049
I found  in the old ESRI forums with the same type of problem I am facing today. The solution to the problem is explained in little detail and since I am not an expert, I was wondering if somebody could describe it to me in little more detail.  We are doing a mental map analysis. We have let's say 50 polygons of a certain city square which are all different in shape, size and location. Our goal is to create a single polygon which would represent the answers from our whole input data. So basically, we need a method for generating a single polygon out of these 50 which would be an "average" polygon in size, shape and location.  Can somebody explain the process?
67566
I have an input point layer that is grouped into clusters, so I want to have each cluster of points converted into polygon. This question  (this question was removed) seems to come close to what I wanted by it hasn't been answered. So basically, I need an algorithm in QGIS that will convert each cluster of points (based on attribute field) as seen below into a polygons?  I have tried  plugin and it gave me wrong result seen below...  A copy of my data is found .
105436
I have a polygon vector layer and a line vector layer in a form of grid (they are both in the .shp format). I need to split polygons by these lines.   I tried digitizing tools but the problem is that it deals only with 1 line at a time and I have more than 52,000 lines. It will take a ridiculously long time to split it manually. How can it be done for all the lines?   I have QGIS 2.18.
81657
Creating Scratch layer gives me a choice between Polygon and Multipolygon, so I started wondering how should I make use of them.    Reading a new book "Mastering QGIS" (through  by Joseph to ), authors' comment was "ESRI shapefiles store geospatial data in multi- type geometry, so using multi- type geometry is a good practice if you plan on converting between formats."  How should I choose one of them (Polygon or Multipolygon) when I create a new polygon layer? (I had confused multi-polygon with multipart-polygon, so I used to choose Polygon.)      One recent situation I have come to choose Polygon/Multipolygon was  in which I draw a dummy polygon as a background layer. Working mainly on shapefiles it seemed I was supposed to choose Multipolygon, although I needed only one polygon. In this case what I needed was simple polygon geometry without any attribute (Not sure this example make any distinction.)
71787
I have been using a process called "Create Polygon Graticule" to create a grid within a polygon with assigned row and column attributes. It is a SAGA tool which I have been running in QGIS. It generates a grid based on the extent of the input polygon with the cell running N to S and E to W. It would be better for my analysis if the direction of the grid was parallel to the longest edge of the polygon. For reference I have attached images of the current automated output and an output that I manually altered to align the grid with the polygon. The grids originally covered the entire extent of the polygon but have been clipped to show only the cell parts that are inside.    Above image is what the tool out puts by default.   This is an image of a grid that was edited manually to fit the necessary parameters.  My question is, is there a way to produce grids that are aligned such as the one in the second image in an automated fashion? I will need to generate grids for a few thousand polygons.