New answers tagged

5

You can use the buffer geoprocessing tool. Make sure not to enter a fixed distance, but instead to select an expression and to use half the geometry length (length($geometry)/2)


0

I think the provision is already there in QGIS. https://docs.qgis.org/2.8/en/docs/gentle_gis_introduction/vector_spatial_analysis_buffers.html Go to Processing > Toolbox Search for Buffer This should give you the expected result.


1

You want the length to be displayed along your line and auto-update as you draw or edit the line? In this case, simply label your line with the expression length($geometry) For the attribute table, use Creating a Virtual Field - when you create a new field with the field-calculator, select virtual field and set the expression you like - e.g. length($...


2

Other than with expressions, you can use the line-width-assistant - it's probably easier because you don't need expressions (but you can, if you want, see below). Select the assistent, select the source ( field that contains the values/width-information in your attribute table), than update values (that automatically selects min./max. values - otherwise ...


2

I think using the "Meters at scale" unit type in the size section of the label properties should let you achieve what you're after. This setting automaticaly adjust the label size as you zoom in and out. You'll have to first set the "meters at scale" unit then play with the size value till your label are the same length of your line (if you need to set ...


1

If your lines are in different layers, you can use the algorithm "Snap geometries to layer". Select the reference layer and the layer you want to snap to it, and specify a tolerance of snapping.


1

Just ST_MakeLine the the initial and the closest point: SELECT a.id, a._unique, closest_pt.dist, closest_pt.line_geom INTO nearest_neighbor_lines FROM pois_1600 AS a CROSS JOIN LATERAL ( SELECT id, ST_MakeLine(a.geom, b.geom) AS line_geom, a.geom <-> b.geom AS dist FROM intersections AS b ORDER BY ...


0

v.net does this also very nice with the "connect" option. Note that after connecting the points to the lines, you would have to run v.category to add IDs to the new line segments (as described in the manual).


3

If I understand this correctly, you need an outer boundary of the combination of all geometries in the layer. For that you can try this: convert all lines to polygons (Lines to polygons algorithm) union all polygons (Union algorithm) dissolve unioned polygons (Dissolve algorithm) These steps should produce polygon which represents the outer boundary (or ...


0

apologies for all these libraries, i'm not sure exactly which is needed... Good luck! this is kind of complicated. and not exactly sure how it works. library(igraph) library(RColorBrewer) library(SpatialTools) library(sp) library(ANN) library(rgeos) library(maptools) library(sp) library(rgeos) library(plyr) library(FNN) library(tidyr) library(foreign) ...


0

Here is one way to do it (the simplified way ) : let's suppose that in each shapefile you have a unique column called index, if you don't you can create it by reindexing the DataFrame lines.reset_index(inplace = True) grids.reset_index(inplace = True) 1 - first apply a spatial join between both of your shapefiles, with operation within to avoid extreme ...


Top 50 recent answers are included