Skip to main content
17 votes
Accepted

Place label along line near start and end of line in QGIS

2020 Oct update - label placement at start/end of lines or with a given offset is now be an inbuilt feature of QGIS 3.16 ! Link shows it in action. QGIS 3.8 to 3.14 Consider using the geometry ...
she_weeds's user avatar
  • 12.7k
16 votes
Accepted

Splitting a Polyline at intersections

You need to use Split lines by lines tool, and use the same file as input layer and split layer, as you can see below: You can find the tool from Processing toolbox -> QGIS Geoalgorithms -> ...
ahmadhanb's user avatar
  • 41.2k
12 votes
Accepted

Generating urban blocks by road centerlines using PyQGIS

General strategy for the solution: Compute dissolved buffer area by road width. (Tool: Buffer) Create bounding box of road layer. (Tool: Extract layer extent) Remove the portion that overlaps the ...
Kadir Şahbaz's user avatar
8 votes

How can I use roads from OSM data in R?

I downloaded a dataset from the City of Rome using the osmar package. After that, I followed your query to get the desired highways and then build a random SpatialPoints object inside Rome bounding ...
Guz's user avatar
  • 3,176
8 votes

Automatically adding nodes to vertices on lines using QGIS

QGIS 3 Use the "Split with lines" tool from the Processing Toolbox (Ctrl+Alt+T). QGIS 2 You can use "Split lines with lines tool" in QGIS from Vector overlay Tools > Split ...
ahmadhanb's user avatar
  • 41.2k
8 votes
Accepted

Divide a polygon into multiple small polygons using a MultiLineString

You may not need to use this MultiLineString variable for what you aim at. This works: from shapely.geometry import Polygon, LineString from shapely.ops import linemerge, unary_union, polygonize poly ...
julien's user avatar
  • 10.2k
8 votes
Accepted

Blending features in QGIS: Approximating road edges for map render

You need to use Symbol levels to have nicely rendered crossing lines. Using symbol levels you can sort the symbol levels and thereby control the order in which the different symbol layers are rendered....
ahmadhanb's user avatar
  • 41.2k
7 votes
Accepted

Merging close lines using v.clean

Buffering the road may be a solution to this problem. create a dissolved buffer of the road using around 20 unit map distance. import the layer into a postgis database and create the middle line ...
Amit Ghosh's user avatar
7 votes
Accepted

USGS topo symbols for light-duty and unimproved roads

This can be done in QGIS using two custom line styles (see the bottom of this answer for the two style files you can import into QGIS): While it might seem like the "Light Duty Road" (two ...
Jake's user avatar
  • 6,924
6 votes
Accepted

Does OSM Road segments contain intersections - reg

In the OSM raw data, all ways (roads or else) are described as a sorted set of node numbers. Roads can be identified by a highway-tag, with some exceptions like highway=bus_stop, bridleway or footway. ...
AndreJ's user avatar
  • 76.9k
6 votes

Shortest path using line layer QGIS

"Shortest path (point to point)" can do what you need. First, all your lines have to be in the same layer. Merge them if needed. Then, to avoid your error, your lines need to be connected ...
MrXsquared's user avatar
  • 35.2k
6 votes
Accepted

Styling road intersections

Duplicate each layer (Right click on the layer name > duplicate layer). This does not create any additional data. It simply loads the same source data into the project again. Change the style of the ...
csk's user avatar
  • 25k
6 votes
Accepted

Finding Minimum Spanning Tree using QGIS

There is an already existing tool in processing plugin in GRASS -> Vector -> v.net.spanningtree You will need to specify the vector line layer and the nodes ( optional ) and in advanced ...
Hicham Zouarhi's user avatar
6 votes
Accepted

Switching road names from uppercase to mixed case in ArcMap?

In ArcGIS Field Calculator, you can use a simple Python expression with the string.capwords function to capitalize only the first letter of each word and change everything else to lowercase. Select ...
lambertj's user avatar
  • 3,077
6 votes
Accepted

Why osmId is not the same across the same road?

OpenStreetMap IDs are given for each segment of a OSM way (in this case the road). In OpenStreetMap roads need to be split in segments when attributes change, for example the maximum speed or the ...
til_b's user avatar
  • 5,187
6 votes
Accepted

Defining extent to limit labeled area in QGIS

You can use Rule-based labeling with this expression as the rule filter within( $geometry, layer_property('raster', 'extent') )
Matt's user avatar
  • 17.7k
6 votes

Defining extent to limit labeled area in QGIS

You can set the data defined "Show label" in the "Rendering" category with the expression intersects(layer_property('smaller_layer', 'extent'), $geometry) to do this. Without ...
Kalak's user avatar
  • 3,919
5 votes

World's roads layer

OpenStreetMap data might be what you are looking for -- it is somewhat standardized and pretty up-to-date across many parts of the globe. Check out their wiki for steps on download and converting ...
Thomas's user avatar
  • 1,477
5 votes

Travel time calculator QGIS

For whoever also stumbles on this question. Now for more than 2 years since the inital question was raised and QGis 3.X has become more mature, one could achieve this by ORS tools or QNEAT3 ORS ...
JosE's user avatar
  • 73
5 votes
Accepted

Road snapping in R - snapPointsToLine / Projection Problem

The warning message is quite clear here: 1: In RGEOSDistanceFunc(spgeom1, spgeom2, byid, "rgeos_distance") : Spatial object 1 is not projected; GEOS expects planar coordinates It requires planar (...
dof1985's user avatar
  • 3,146
5 votes

Measuring distance between points along line in QGIS

I first thought this question was basically same as another recent question Points layer distance from the start of line layer in QGIS. However, there is an added complexity in this one, that OP ...
Kazuhito's user avatar
  • 31k
5 votes
Accepted

Road design using Least cost path by longitudinal slope in ArcGIS Desktop?

Connecting 2 points on contours by straight line is not going to work, as seen on your second picture line crosses same contour twice. I also very much doubt that any out of the box tools can help you....
FelixIP's user avatar
  • 23.2k
5 votes
Accepted

Get values of terrain elevation of roads in QGIS?

(I would suggest not to follow the approach in the linked blog post.) You should be able to use more straightforward tool, Profiles from lines in QGIS Processing Toolbox | SAGA | Terrain Analysis - ...
Kazuhito's user avatar
  • 31k
5 votes
Accepted

Extracting roads shapefiles from old TIGER/Line RT format?

QGIS has a built-in driver for the TIGER data, as you've noted, through GDAL. This is exposed through the GUI in the Data Source Manager/Add Vector layer dialogs. Similarly to how one would load ...
Saijin_Naib - No To OpenAI's user avatar
5 votes

Identifying road intersections in QGIS

Solution 1 Run Menu Processing / Toolbox / Line Intersections (see documentation) to get a new layer with points showing where lines cross (red dots in the screenshot). You can select twice the same ...
Babel's user avatar
  • 73.8k
4 votes

Segmenting road polygon layer

I'm not sure how well this would work and it would depend on the tools that you are using, but the following process may get acceptable result for you. Densify the polygon layer boundaries. Play ...
MickyT's user avatar
  • 3,430
4 votes
Accepted

Automatically adding nodes to vertices on lines using QGIS

You could use the "Extract vertices" tool can be found under Vector > Geometry Tools > Extract vertices or in the Processing Toolbox (Ctrl+Alt+T) This will create nodes at each vertex ...
Joseph's user avatar
  • 76.1k
4 votes
Accepted

Calculating density map of cycleways using fishnet in ArcGIS Desktop?

To do this I would: Intersect your cycleways and the fishnet Use Summary Statistics to SUM the lengths of the intersected cycleways by fishnet polygon ID Use Join Field to join the summed lengths ...
PolyGeo's user avatar
  • 65.3k
4 votes

Get values of terrain elevation of roads in QGIS?

The blog post example is completely wrong (see the comments box of the blog!).. With the recent QGIS version (3.4.) I can do it easily with the tool "Extract vertices", which gives you all line ...
Kay's user avatar
  • 1,856
4 votes
Accepted

Mapping out railways from paper?

You have to scan your paper map and then georeference your file, so that the image is aligned correctly in space in your coordinate system: http://desktop.arcgis.com/en/arcmap/latest/manage-data/...
GIS7's user avatar
  • 358

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