Hot answers tagged

16 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
  • 10.8k
15 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
  • 40.5k
11 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

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
  • 40.5k
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,166
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
  • 40.5k
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

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
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,874
6 votes

Travel time calculator QGIS

You can either use pgRouting or if not using your data but the OSM street network would be fine, use the OSM Route plugin: Enter a start point and fill out the Accessibility Analysis options.
bugmenot123's user avatar
  • 10.8k
6 votes

How do I find the slope of road segments with point elevation data of the same linear path

Create a copy of your road. Start editing it, select line and and split into equal length segments, I’d say approximately 50 m. Convert segments to 3D shapes: Calculate field abs( !Shape!.lastPoint....
FelixIP's user avatar
  • 22.6k
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.5k
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
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
  • 24.5k
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
  • 2,962
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
  • 4,869
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
  • 63
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
  • 30.5k
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

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
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
  • 22.6k
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
  • 30.5k
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's user avatar
  • 2,709
5 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
  • 14.8k
5 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 ...
Louis Cottereau's user avatar
4 votes

Symbols Appear Different in Size

I've experienced issues similar to this while using ArcMap 10.x. When I've changed the size of the map document after I developed the map with symbols and labels. Let me explain further. For example,...
whyzar's user avatar
  • 12k
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,410
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
  • 75.3k
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
  • 65k

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