Skip to main content
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 ...
MappaGnosis's user avatar
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"
Jonathan's user avatar
  • 523
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 (...
gonethou's user avatar
  • 161
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 -> ...
TJR's user avatar
  • 1,612
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 ...
Shawn's user avatar
  • 1,928
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 ...
Walshe_d's user avatar
  • 739
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 ...
Babel's user avatar
  • 74.9k
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.
tomalos's user avatar
  • 311
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 ...
Joseph's user avatar
  • 76.3k
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.
Taras's user avatar
  • 34k
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 ...
Bera's user avatar
  • 77.8k
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 ...
Matt's user avatar
  • 17.9k
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 ...
Aware's user avatar
  • 81
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 ...
YoLecomte's user avatar
  • 3,340
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: ...
Babel's user avatar
  • 74.9k
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 ...
J. Monticolo's user avatar
  • 15.9k
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 ...
Bera's user avatar
  • 77.8k
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
Bera's user avatar
  • 77.8k
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 ...
Bera's user avatar
  • 77.8k
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 ...
Taras's user avatar
  • 34k
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 ...
YoLecomte's user avatar
  • 3,340
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 ...
Joseph's user avatar
  • 76.3k
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" ...
Matt's user avatar
  • 17.9k
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 ...
geozelot's user avatar
  • 30.9k
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 ...
Babel's user avatar
  • 74.9k
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 ...
Bera's user avatar
  • 77.8k
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 ...
Karol Daniluk's user avatar
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'.
Kadir Şahbaz's user avatar
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 (...
Babel's user avatar
  • 74.9k
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 ...
Taras's user avatar
  • 34k

Only top scored, non community-wiki answers of a minimum length are eligible