Skip to main content
13 votes

Slope, in which direction?

The direction of a Slope is known as its Aspect. It's usually defined as the direction the slope "faces", to me that's a little ambiguous and it's more intuitive to think of it as the "downhill" ...
Dan C's user avatar
  • 12.2k
11 votes
Accepted

Labeling (one-way) streets in QGIS?

You don't need to dissolve lines by name, as you can use the Merge connected lines to avoid duplicate labels option in the Rendering tab of Labels' options. This will reduce the number of labels, and ...
Alexandre Neto's user avatar
11 votes
Accepted

Changing MultiLineString direction using PyQGIS

I will focus on the geometry creation part, because the feature editing part is fully explained in many places, including the example inside the question. I will use some Python list comprehension, ...
Javier JC's user avatar
  • 892
10 votes

Changing (flipping) line direction in QGIS

It's built into the app now and no plugins are required. It is accessible via the Advanced digitizing panel that is not shown by default. https://docs.qgis.org/3.10/en/docs/user_manual/...
Alan Davison's user avatar
9 votes

Right-hand-rule in QGIS

Use QGIS expressions with force_rhr() function: simply use force_rhr( $geometry) using Menu Processing > Toolbox > Geometry by expression.
Babel's user avatar
  • 72k
9 votes

Changing (flipping) line direction in QGIS

If you want to reverse selected crossection lines in QGIS3.X, I recommend the plugin--digitizingtools. Of course it works well in qgis3.x. And at its tool bar, you can see flip line tool. Enjoy ...
lilith894's user avatar
  • 109
8 votes
Accepted

Labeling line twice based on direction in QGIS

Instead of single labels, use rule-based labeling and create two rules: one for the label this way, the second for the label that way. For the second one, in placement tab, activate Geometry ...
Babel's user avatar
  • 72k
7 votes
Accepted

Label direction check

To solve your problem you have two different options. Solution 1 by default option QGIS, at least from the 3.10 (not sure about previous versions), offers the opportunity to add this arrow symbol to ...
Val P's user avatar
  • 3,868
6 votes
Accepted

Standard direction format in GIS software

In geomatics (i.e., surveying, cartography and GIS), directions are usually referred to as bearings or azimuths. They are almost always quoted in degrees for crude measures or degrees, minutes and ...
Martin F's user avatar
  • 8,946
6 votes

Switching line direction in QGIS

Based on Nathan's post I've created a processing script to reverse the direction of features: #!/usr/bin/env python # -*- coding: utf-8 -*- # define Interface ##QGIS tools (QGIS 2.x)=group ##Reverse ...
eclipsed_by_the_moon's user avatar
6 votes

Switching line direction in QGIS

This plugin reverses the line direction too: https://hub.qgis.org/projects/swapvectordirection You have to select a feature, and turn the layer into edit mode before clicking on the plugin icon.
AndreJ's user avatar
  • 76.7k
6 votes

Displaying arrows on pipes from upstream to downstream using QGIS?

If your vectors are not necessarily in the right direction and if you have a point shapefile with elevations and correct topology, I would suggest the following: Create a 'WKT' field in your point ...
Victor's user avatar
  • 1,852
6 votes

Finding compass direction between two distant GPS points?

A search yielded this website. It shows the following formula for calculating bearing: θ = atan2( sin Δλ ⋅ cos φ2 , cos φ1 ⋅ sin φ2 − sin φ1 ⋅ cos φ2 ⋅ cos Δλ ) where φ1,λ1 is the start point, φ2,λ2 ...
Fezter's user avatar
  • 21.9k
6 votes

Right-hand-rule in QGIS

Since QGIS 3.4.3 there is QgsGeometry().forceRHR() as Python equivalent. You can use it as follows: polygons = QgsProject.instance().mapLayersByName('polygon')[0] with edit(polygons): for feature ...
MrXsquared's user avatar
  • 34.5k
6 votes

Creating Direction data in QGIS between two layers?

Not that long ago, I did something similar using two point layers: one containing the source; the other containing destinations. Example layers: What I did was: Use the Distance to nearest hub ...
Joseph's user avatar
  • 75.9k
6 votes
Accepted

Calculating polygon main direction and creating line out of it

A true weighted orientation is non-trivial; I'd say the ST_LongestLine within a polygon is the best approximation, and will yield consistent results over multiple iterations. To get your initial ...
geozelot's user avatar
  • 30.3k
6 votes

Getting angle of point generated from DEM in Raster using Field Calculator in ArcGIS Desktop?

I know ArcGIS's python interpreter is weird, but I'm pretty sure your syntax is wrong. My recollection is that you don't need to use their weird escape characters within the scope of the function ...
Paul H's user avatar
  • 915
6 votes

Detecting and making all connected lines in the same direction in QGIS

Compare the azimuth of each line to the line group mean, and reverse the line in each group that deviate the most from the group mean: Refactor fields (or use two field calculators) to calculate: ...
Bera's user avatar
  • 74.2k
6 votes
Accepted

Calculate azimuth between points

As your items are already sorted by time, Id can be used as the ordering reference. Go to your layer's Attributes Table and create a new Field with the Field Calculator, using this formula: azimuth($...
Kasper's user avatar
  • 3,352
5 votes

Determining direction of polygons using QGIS?

In QGIS 3.16+ there is a new function: main_angle() that makes things easier.
Francesco Catani's user avatar
5 votes

Determining direction of polygons using QGIS?

If you run the "Oriented Minimum Bounding Box" algorithm over your layer, you'll get a new angle field in your layer which indicates the angle of this minimum bounding box. I suspect that's what you ...
ndawson's user avatar
  • 27.7k
5 votes

Creating direction raster in QGIS

In theory this should be possible using either GRASS r.mapcalc or SAGA raster calculator. I'll assume you have a single origin point for this. However I've not been able to get this to work, but I'll ...
Steven Kay's user avatar
  • 20.5k
5 votes
Accepted

How to create a symbol with directional arrows in QGIS 3?

Basically you already got it. Just change the following: Instead of on central point select with interval: And rotate your marker (or choose a different one):
MrXsquared's user avatar
  • 34.5k
5 votes
Accepted

How to follow oneway directions using sld?

Labels that might be looking "downwards" are automatically flipped to keep them readable. You can turn that off using the "forceLeftToRight" vendor option: https://docs.geoserver....
Andrea Aime's user avatar
  • 17.5k
4 votes
Accepted

Determining the direction of polygons?

As there is no unique identifier on the building layer, create it. Create oriented minimum bounding boxes (OMBB) from geoprocessing tools. Merge them by location (intersects) with buildings. Change ...
tomalos's user avatar
  • 191
4 votes

Which projected coordinate system for whole China?

I would recommend an Azimuthal Equidistant projection for what you are looking for. This type of projection: "preserves true scale from a single specified point on the projection to all other ...
whyzar's user avatar
  • 12.1k
4 votes

Direction of two lines (turn right or left)

The dot product of two vectors, A and B, A.B, is the component of vector A in the direction of vector B. If this is positive then A is going forward with respect to B, and if it is negative then A is ...
Spacedman's user avatar
  • 64.6k
4 votes

What does QGIS arrow direction mean?

It is the order the geometry was created. From first to last.
HeikkiVesanto's user avatar
4 votes
Accepted

What does QGIS arrow direction mean?

It can be in any direction you want. By default, it is from the 1st to the last point, but this can be easily reversed in the style options
JGH's user avatar
  • 42.2k
3 votes

Determining direction of polygons using QGIS?

I have a way which might work just using QGIS vector operations and expressions. It finds the angle of the longest segment of polygon features. In outline: Convert the N polygon features to N ...
Spacedman's user avatar
  • 64.6k

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