TransWikia.com

Is there a quick way to calculate the change in an attribute over distance?

Geographic Information Systems Asked by pballs on September 26, 2021

I am working in QGIS 3.14.0 and have a set of point data input via latitude and longitude in a CSV file; this file also includes data taken at these points. I would like to visualize the change in this data from point to point as a sort of slope (i.e., since it’s nutrient data, micromolar per meter)

Currently I am using distance matrix to get the distance from point to point in meters, field calculator to get the slope, multipoint to point, then point to path all in order to display this in the way that I want, but I am wondering if there is a quicker way to do this. I have uploaded some images just as an example of my data here. The lines in my images are what I want them to look like, however, when I go through the steps outlined above, the lines only go from point 1 to 1 and 2 to 2 and so on, rather than 1-2 2-3, etc.

One Answer

From what I see, the link between the points is defined in the table of attributes inputID and TargetID, which, I guess, you enter manually. Unless there is a criterion that allows you to assign it automatically.

And you want the other fields to be updated, based on the distance of the points.

You can configure the automatic update of the attributes based on their geometrical relations, when creating and/or editing them. You will use expressions to do this.

I know two ways to automatically update the content of fields with expressions:

1.- activate editing > open attribute table > field calculator > select virtual field > write the expression

This expression will be automatically calculated every time you create a new entity

2.- open the layer properties dialog box > attributes form > in defaults > write the expression.

This alternative is much more complete, if you select the option apply default value when updating, when you make a change in any field will update your field(s) of interest.

Answered by Luis Perez on September 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP