Hot answers tagged

6

you can also use the field calculator to change the geometry directly for selected points or all points. see picture below (sorry it's the german version but it should be clear anyway):


6

Assuming your data structure is like below id, start_x, start_y, end_x, end_y This is straighforward in QGIS if you have data in a projected CRS. You can add your text file as a vector layer, and add a virtual field in the Field Calculator with the extression such as below. distance(make_point( "start_x" , "start_y" ), make_point( "end_x" , "end_y" )) ...


3

I'm not sure whether you are comfortable using the python console, but here is a short script I wrote which should do what you want (one row of points at a time). In case you are not familiar with running scripts in the console, open the python console, click the 'Show Editor' button, and paste the following code into the editor. Note: Before running the ...


3

I use this code to ~randomly place a grid of sample plots for forest inventory: import numpy as np from itertools import product polylayer = iface.activeLayer() #Highlight polygon layer in layer tree npoints = 8 #Change pointlayer = QgsVectorLayer('Point?crs=epsg:3006', 'point' , 'memory') #Change epsg prov = pointlayer.dataProvider() for poly in ...


3

I implemented Cyril's comment. This is the input test polygon: Polygon to Lines Split lines by maximum length using $length / 7 in the expression builder. (8 vertices) Extract specific vertices (0 stands for start point) Voronoi Polygons with 100% buffer to make sure that parts of the polygon do not lie outside the generated Voronoi (in theory they may ...


2

You have mentioned that you are using "Regular Points" to create points arranged in lines over an area. You could create another layer with "Regular Points" with half the vertical spacing of the first layer. Pay attention to the extent of both layers. Then you could use this new layer to snap new points on the first layer to decrease the spacing. ...


1

You can create a virtual layer that will join the two layers and apply the desired filtering. go to the menu Layer > Add Layer > Add/Edit Virtual Layer... and enter the query SELECT pt1.id, pt2.id, ROUND(MIN(ST_Distance(pt1.geometry, pt2.geometry)),2) AS distance FROM point_layer_1 AS pt1, point_layer_2 AS pt2 WHERE pt2.year_column BETWEEN pt1....


1

Good day, I’m moving from theory to practice, the initial data is a layer (table) with the name adm_polygons, run the script: WITH ta AS ( WITH at AS (SELECT id, (ST_ExteriorRing(((ST_Dump(geom)).geom))) as geom FROM adm_polygons), intervals as (SELECT generate_series (0, 8) as steps) SELECT steps AS stp, ST_LineInterpolatePoint(geom, steps/(...


1

This is a common question in fields like pollution tracking and exploration geochemistry but it is seldom straightforward. The fact you seem to have a positive correlation using (non-directional) correlation analysis is encouraging- so long as it is not just reflecting one or two high points. Check this first on an X-Y scatterplot. There are fancy ways to ...


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