# Tag Info

6

Buffer the lines with dissolve so all nearby lines are inside the buffer, but not so wide that the other line clusters are included Multipart to Singlepart Field calculate a group attribute (@row_number) Intersect with lines to get the group attribute on each line Extract one random line per subset/group:

6

This solution relies on two relatively new functions of QGIS expressions: array_sum(), avalilable since QGIS 3.18 and overlay_nearest(), available since QGIS 3.16. Calculate the total length of the roads per province. Calculate the length of the percentage you want to get. In my example, the total length is 1090566 m, 10% thus is 109056.6 m Remark: see ...

5

This seems to be a classical case for a Two-point equidistant projection, see: Wikipedia: Two-point equidistant projection and ArcGIS: Two-point equidistant. Create a custom projecton, based on the pre-installed Sphere_Two_point_Equidistant projection (ESRI:53031) with the two points in England and Germany as the two points. For my example of London (51 N, ...

4

On a map, you could make 2 rasters (rectangular grids). One would have the distance to the German location, and the other to the point in the UK. You could then use the Raster Calculator to highlight cells where the difference between them is less than 100 km. This would create a third grid, which you would display on a map. There are probably more elegant ...

4

Meanwhile (since QGIS 3.16 with the new overlay_crosses function) you can use QGIS expressions to automatically calculate what you want. The expression to use on the lines layer and referring to the polygon layer (replace polygon with the name of your polygon layer) looks like this - see below for an explanation. You can use this expression with field ...

2

To be mathematically strict, the middle point of polyline is not placed in the average of LatLng coordinates of starting and ending point (as suggested in the other answers or using getCenter() method). Polyline in Leaflet draws a straight line over a Mercator projection, so latitudes are deformed. When working on small scale, like the example on this post, ...

2

In QGIS 3x instead of the plugin mentioned above, you can find the "Points to path" tool in your processing toolbox. Works exactly the same...

2

You can use QGIS expressions with Geometry Generator or Geometry by expression for this - see here for details about these two options. In both cases, simply use this expression: close_line( \$geometry). Screenshot: Blue=original line; red=line created with the above expression:

2

What you seem to mean is how often does each line cross the boundary (outline) of each polygon. When a line crosses a polygon, the number of intersection points is infinite as the intersection has the form of a line and this consists of an infinite number of points. To count the number of crossing points with the boundary, first convert your polygons to ...

1

I think that you should be able to do this by buffering your existing polygons using a distance perhaps 10% of the width of your smallest polygons, and using the option to have the inner borders of your buffers dissolved. This should give you a single polygon feature suitable for Creating Centrelines from Road Polygons/Casings using ArcGIS Desktop?

1

If your layer is in a geographic CRS ( coordinate reference system) like EPSG:4326, reproject it to a projected CRS like EPSG:3857.

1

Create end points (NODES) and delete identical in shape. Transfer nodes OIDs to lines as described here to find from and to nodes of lines. Create COMBO field using something like: str(min( !TI!, !FI!)) + "_" + str (max(!TI!, !FI!)) in order to find twins: Delete identical using this field.

1

Assuming this represents the skeleton of a lake I can think of several ways to automate the trimming back to the centreline. But they all have a flaw, how do you identify the inlets/outlet of the lake and exclude those from any trimming operation. You need to have previously flagged these in some way which inevitably means a manual intervention and thus the ...

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