20
votes
Creating point features with exact coordinates in QGIS
In QGIS 3, the NumericalDigitize tool no longer seems to be available but here is a further solution. As of QGIS 3 you can simply copy and past WKT directly into the canvas. This works for single or ...
17
votes
Creating points in specified distance along line using QGIS
In QGIS 3 (at least in QGIS 3.10) there is a processing tool for that purpose: "Points along geometry"
16
votes
Retrieving start and end points for each line in line shapefile in ArcGIS Desktop or QGIS
QGIS solution:
It is possible to extract begin and ending nodes (coordinates) of a line vector file, simply by using xat and yat in the field calculator, with the respective indices 0 (start) and -1 (...
13
votes
Finding middle point (midpoint) of line in QGIS
Since this question was asked, an interpolate function has been added to PyQGIS on the QgsGeometry object.
Here is a quick example of how to use this in the Python console inside of QGIS (Plugins -> ...
12
votes
Accepted
How does GeoPandas' representative_point() work?
Geopandas uses shapely for geometry manipulations. In shapely representative_point is a call to the GEOSPointOnSurface method in the GEOS C library. The GEOS library is also used by PostGIS, so I'm ...
11
votes
Accepted
Creating point on surface in QGIS
In QGIS 3.10 this option is not available using Vector > Geometry Tools > Centroids.
However if you search for "Point on surface" in the Processing Toolbox (Ctrl+Shift+T) using QGIS ...
11
votes
Using multiple XY fields for geometry definition in point layer in QGIS
Use a Geometry Generator style for your point layer with an expression that creates a point based on x/y coordinate values for surveyed locations if it exists and else create a point based on x/y ...
9
votes
Accepted
Getting centroids for multiple lines in QGIS
In tool "Mean coordinate(s)" from the QGIS's Processing Toolbox (Ctrl+Alt+T) use Unique "ID" field.
9
votes
Getting centroids for multiple lines in QGIS
In the Field Calculator, create a new String field and set the length to be something high like 99. Then use the expression:
geomToWKT(centroid($geometry))
This should give centroid coordinate values ...
9
votes
Accepted
Creating specific amount of points along line in QGIS
Try the "Points along geometry" tool by changing the 'Distance' to $length/50.
9
votes
Adding points beside existing point feature in QGIS
You can use the following Processing Toolbox (Ctrl+Shift+T) steps:
Reproject your layer to a coordinate system with units in meters
Rectangle ovals diamonds, create rectangles with desired width and ...
9
votes
Making buffer around crossing point on lines intersection in QGIS
You can use either of the following expressions - Either as a Geometry Generator symbol layer (on Layer B) or by using the Geometry by Expression geoprocessing tool if you wish to create a new layer ...
8
votes
Creating point features with exact coordinates in QGIS
No plugin, CAD digitalized or field calculator was necessary for me.
Just put the table in edit mode, add a vector point to the map, then use the Node Tool. You can drag the point with it, or by ...
8
votes
Creating mid point from line layer in QGIS
If Python is Ok for you, you can easily do that with that code snippet.
Copy/paste this code into the editor of the Python console, select your line layer and run the script!
from qgis.utils import ...
8
votes
Creating specific amount of points along line in QGIS
You can create points with Geometry generator or Geometry by expression (see here how to do that) using this expression. In line 3, change 20 to set the number of points you want to create per line:
...
8
votes
Accepted
Creating centroid on curved surface in QGIS
I don't know a tool to have directly what you want but I propose here a workflow to have the following result :
Names like this refers to QGIS processing algorithms
Compute the Minimum Bounding ...
8
votes
Creating set number of regularly spaced points inside of polygon in QGIS
I use this pyqgis code to create a fixed number of sample plots in forest stands/polygons. It will create a point layer in memory. Click/highlight your polygon layer, adjust the number of plots below ...
8
votes
Accepted
Generating dangle point for polyline in QGIS
Extract the vertices from road layer
Explode the lines
Join each line to the vertices, end points will get line count 1 and all other more than 1
Extract them
8
votes
Accepted
Generating x, y, coordinates within polygon/polyline with certain interval in QGIS
Grid is the correct term. If you have a line layer you need to convert it to polygon.
Create a point grid using the polygons extent with 500 m x and y spacing
Extract the points inside the polygon ...
8
votes
Accepted
Interpolating series of points between two locations using Python
A simple linear interpolation solution
This solution generates N-number of random points lying on a straight line between two initial locations. Initial latitude and longitude were transformed to x ...
7
votes
Accepted
Plotting points along line at specific distance value using PyQGIS
It's kind of easy to do with a Python script that you can run from the editor of the QGIS's Python Console.
First, you need to get your line layer and get the feature inside.
Then, you need to loop on ...
7
votes
Creating mid point from line layer in QGIS
You can use the GDAL/OGR tool: Create points along lines.
Make sure you specify 0.5 as the distance. This calculates the fraction of the total length (not the distance) as the tool incorporates the ...
7
votes
Generating dangle point for polyline in QGIS
The specification of any polyline is a little optimistic (given the possibility of duplicate geometries), but for a topologically correct network it can be done using a "Virtual Layer" ...
7
votes
Accepted
Getting vertices of UTM grid in PostGIS
To extract the contextual corner points of each cell, find those vertices that have an angle greater than roughly 90° with respect to the preceding and following vertex:
SELECT
utm_c.[*], -- list ...
7
votes
Generating points along line with specifying the origin of point generation in QGIS
The tool Points along Geometry follows line direction and thus begins where the line has the first vertex (start point). To start from the other end (the last vertex, end point), reverse the line ...
7
votes
Generating points along line with specifying the origin of point generation in QGIS
You can create a Virtual Layer using functions ST_Line_Interpolate_Equidistant_Points and ST_Reverse
Replace road with the name of your layer.
To get the point starting from line starts:
SELECT ...
6
votes
Retrieving start and end points for each line in line shapefile in ArcGIS Desktop or QGIS
In QGIS use Extract Specific Vertices tool. Set Vertex indices to 0 to get start points and -1 to get end points or 0,-1 to get both.
Note the description:
The first vertex corresponds to an index ...
6
votes
Accepted
Creating different numbers of random points inside polygons using PyQGIS
You pass the index number of the field when using num. Just use QgsProperty.fromExpression('"vlp1_num"') for parameter 'VALUE'.
6
votes
Generating dangle point for polyline in QGIS
To just visualize the dangles, use Geomtetry generator with this expression (see below to create actual geometries):
difference (
collect_geometries (
array_foreach(
array (...
6
votes
Adding points with coordinates delimited by commas from CSV file in QGIS Python Console
There are several things regarding your code:
the uri for a CSV file must include the file:// prefix, as it is mentioned in the QGIS Documentation:
The provider string is structured as a URL, so the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
point-creation × 52qgis × 38
line × 18
point × 8
csv × 8
point-in-polygon × 8
pyqgis × 7
import × 6
vector × 5
distance × 5
qgis-processing × 5
latitude-longitude × 4
python × 3
coordinates × 3
centroids × 3
random × 3
geometry-conversion × 3
geometry-generator × 3
midpoint × 3
coordinate-system × 2
shapefile × 2
qgis-3 × 2
geometry × 2
geopandas × 2
expression × 2