Drawing points around circle in QGIS

Never used matrices so I could be wrong. But I would create a buffer from a central point (which you can add manually) and use the radius of a circle (I'm assuming the radius is the same for all of them otherwise you may have to create more buffer layers). When buffering, set the segments to approximate to 99 to have a smoother perimeter:

Point and buffer

You can then use Convert polygons to lines on the buffer layer.

Polygon to line

And with the output, use Convert lines to points (both tools are from SAGA via the Processing Toolbox). This should give you a point layer which lies on the circumference of the circle.

Line to points

Hope this helps.


EDIT:

When you use Convert polygon to lines, calculate the length of line via the Field Calculator by creating a new column (select Decimal numbers) and inserting this into the expression:

$length / 23

This will give the same length for each "segment".

Now when you run the Convert lines to points function, input the length you received into the Insert Distance field. This will produce a 23 points at the same length:

23 points


Alternative method:

Take your final Step 5 layer (with the 396 points) and open up the Attribute Table and Field Calculator. Create a new integer column (eg. RowNum) and insert this expression:

$rownum

This provides each field with a unique value. Next, select the Advanced Filter (Expression) at the bottom of the Attribute Table:

Select Advanced Filter

And enter this command (replace "RowNum" with your named column):

("RowNum") %17

This expression skips every 17th field (396/23 = 17, we want to keep every 17th field). Select ALL those fields shown and DELETE them. Then select the Show All Features at the bottom of the Attribute Table. You should now (let's all pray!) have 23 points. Remember to also save!


I think this may create the points you need, in a simpler manner (I used a spreadsheet, because it is easier, but this could be done inside QGIS, too:

a) You want "n" points, in your case, 23. Calculate the value of 2*pi/n. This is the angle between each of your points [ "angle" ]

b) Create a column ["ID"] with the numbers 1 to n ; n=23 in your case

c) in the next two columns, save the results of this expression:
sin( angle * (ID-1)); The first ID is really at 0 degrees
cos( angle * (ID-1))
These are the x-y coordinates of all your points

d) Create 2 more columns. These will be the other endpoints for line segments. Insert all the values from the first two columns, but shift down one row: Row 2 for this pair of columns contains the values for Row 1 in the first pair of columns.

e) for row 1, of this second pair, place the value of row n (23) of the first column

You now have 5 columns:
First column is the point ID
Columns 2-3 and Columns 4-5 represent the line segments

So, now you have: points, line segments, or a polygon, depending on what you do with the data.

I crafted a spreadsheet to do this in about 2 minutes. If I were using it, I would export the excel spreadsheet to CSV or somesuch, and import as needed, that is, into points, lines or a polygon.

If I figure out how to import a spreadsheet, here, or post an image at least of it, I will.

Tags:

Point

Qgis