Skip to main content

Questions tagged [length]

The longest extent of anything as measured from end to end

Filter by
Sorted by
Tagged with
0 votes
2 answers
32 views

Splitting lines and getting the lengths in QGIS

I am new to QGIS. I need to split my vegetation line (2.19km length) into segments based on the erosion and accretion and want to get the length of those segments. I was able to split the vegetation ...
Darsh's user avatar
  • 1
0 votes
1 answer
59 views

Automatically calculating distance on specific layer in QGIS

In the photo above, I have an area that is drawn. This is my case study. I'd like to calculate the distance of the electrical networks, according to their voltage, inside my case study. I know how to ...
AlexandreBAZ's user avatar
2 votes
0 answers
52 views

Calculating the end km with reference to the start km of road in QGIS

Note the labelling on the picture to be the lengths of the link segments and have been selected from Right to Left. Start KM = KM at the beginning of the link End KM = KM at the end of the link. (...
Kendel Mashuga's user avatar
0 votes
1 answer
43 views

Replicating Measure Line Tool Output programatically for rotated/oriented rectangles

What I have I have some oriented rectangles/polygons that represent boats in a geoJSON file. The coordinates of the points are in EPSG:4326. Example here: { "type": "FeatureCollection&...
SFSDev's user avatar
  • 33
4 votes
1 answer
59 views

Getting length in meters of features in line type layer using PyQGIS

I want to get the length in meters of features with line-type geometry independent of the CRS of the layer and project. Is there any way to do this? I used the code below but I'm not sure of the unit ...
Aloísio Ângelo's user avatar
0 votes
1 answer
19 views

Measurement display while creating a vector layer

I am trying to display the measurement tool on QGIS while I am adding a vector to a vector layer I created. I am using EPSG 4326 and I cannot figure out how to use the measurement tool while creating ...
Eric Lebar's user avatar
6 votes
2 answers
235 views

Getting perimeter for each polygon without shared sides in QGIS

I want to get the perimeter of each polygon (building) I have. Some polygons are adjacent, thus sharing a side. Shared sides should be excluded from the calculation for each polygon. In simpler words: ...
Michele Cordini's user avatar
3 votes
2 answers
138 views

Measuring border segment length while creating a polygon in QGIS

I am recreating historic (1770s) land parcels for an area of a town based on their description in written deeds. This will be a series of intersecting polygons when I am finished, with many sharing ...
Joe Bagley's user avatar
0 votes
0 answers
21 views

Positioning by length of line-element section using QGIS

To indicate a position along a line-element (like a road, or in my case a river) I want to use the chainage of the river (in German: Kilometrierung) rather than regular coordinates. The chainage of a ...
Timm's user avatar
  • 41
2 votes
1 answer
98 views

Split a line using "Split lines by maximum length" does not generate a result using QGIS

In QGIS I try to split a line of 11.7 km length into segments of 450m plus a rest. I tried to use "Split lines by maximum length", but it just does not work. For some reason, to the right of ...
Timm's user avatar
  • 41
0 votes
0 answers
136 views

Calculating road condition score percentages for each zip code with SQL query in QGIS

I have a shapefile that holds information about the condition of a road network that runs across several cities (zip codes): The road network is split into segments of various lengths (meters) Each ...
dot314's user avatar
  • 51
0 votes
0 answers
59 views

QGIS3 - length3D strange results

I am using QGIS 3.32. My project and data are in EPSG:4236-WGS84. I used drape (set Z value from raster) the line layer onto an elevation grid, resulting in a Line (MultiLineStringZ). On this layer, I ...
Rob Irwin's user avatar
  • 121
3 votes
1 answer
255 views

Always round up command

I have a problem with rounding numbers. I'm searching for a command that always rounds UP the length of a line to the next 0,1m. For Example I have a line with the length 56,12m I want to be rounded ...
Toby's user avatar
  • 135
1 vote
1 answer
104 views

Finding length and percent of line across polygon in QGIS

I have a layer with several line features and a polygon layer which has land ownership information (so thousands of parcels). I want to append several columns to the line layer attribute table ("...
curiousarchaeologist's user avatar
4 votes
2 answers
192 views

Calculating lengths and percentages of potholes with SQL query in QGIS

I have a shapefile in QGIS that holds information about the amount and severity of potholes on a road network across several cities: The road network is split into segments of different lengths (...
dot314's user avatar
  • 51
4 votes
2 answers
185 views

Adding up line length for lines that pass through polygon in QGIS

I have three lines as per the below picture. The layer is called 'line'. A is 60m, B is 30m and C is 90m. I have a polygon layer consisting of 1 square. The layer is called 'polygon'. I want to make a ...
spreaderman's user avatar
3 votes
1 answer
93 views

Adding length constraints to line features in QGIS

I want to add length constraints to my line feature column 'type' depending on the field value, to make it impossible to create a new line longer than x m. Below is a screenshot of the categorised '...
joeliketoe's user avatar
5 votes
1 answer
148 views

Selecting top two features with longest length in the line vector file in QGIS

I have a line vector file and I need to select two lines with the longest length using expression. I am familiar with selecting the line with the longest length: length($geometry) = maximum(length($...
unknown123's user avatar
0 votes
0 answers
28 views

In QGIS, how can 'Points along Geometry' give a significantly greater length than $length of a line?

If I use either QChainage or 'Points along Geometry' to put length markers along a route, I get a different (longer) total than if I calculate the whole line length with $length. It's not trivial, ...
Campbell Smith's user avatar
3 votes
2 answers
276 views

Show length of selection

Today I was calculating length of features to know how long a certain route will be. I was wondering if there is a quicker way to find out the length of a selection of features? I am looking for a ...
e-shirt's user avatar
  • 667
1 vote
1 answer
123 views

Compute length of geometry column after reprojecting using to_crs()

I have a GeoDataFrame created from a shapefile having CRS EPSG:4326. Even though the GeoDataFrame has no src assigned the coordinates are correctly expressed in this CRS. I want to calculate the ...
Natalio's user avatar
  • 141
1 vote
0 answers
73 views

Calculating the length of lines using PyQGIS

I have a polygon layer ('anlage') and a line layer ('Linie'). I intersected these two shapefiles and created a new shapefile and a new field to calculate the length of intersected lines. But the ...
Sedigh pagh's user avatar
1 vote
0 answers
44 views

Line lengths differ depending on method used QGIS3

I have a layer containing multiple non-overlapping lines (MultiLineString). I want to calculate the length of each line. However, I get three different answers depending on the method used to ...
user2175481's user avatar
0 votes
2 answers
110 views

Adding new fields with conditions and calculating the sum of lengths and numbers using PyQGIS

I am developing a new plugin using Python in QGIS. I want to get an output with the result of a specific attribute table from another layer already existing in my project => layer "SUPPORT&...
Fatine MOBARIK's user avatar
2 votes
0 answers
74 views

Calculating length of common boundary with virtual layer in QGIS problem with output

I'm calculating the length of common borders of 10 sets of polygons with the solution posted in this question: https://gis.stackexchange.com/a/360776 In 8 of the 10 datasets everything works fine, but ...
Denise's user avatar
  • 91
4 votes
1 answer
130 views

Setting symbol rendering based on feature visible length in QGIS

I am displaying symbols at the middle of lines and I would like them to be visible only when the length of the feature displayed on my screen is long enough (which I call "visible length" in ...
Maxime Riou's user avatar
1 vote
1 answer
62 views

How to dissolve touching polylines [closed]

I want to dissolve some polylines clipped in a series of polygons, but since there are different polylines in the polygons, I cannot dissolve those with the attributes of polygons. For example in the ...
Reza Naghedi's user avatar
0 votes
0 answers
122 views

Inconsistent Line lengths and distance measurements

I've imported OSM data, including specifically LineString railroad tracks for different subdivisions. I want to distribute mile markers at fixed intervals, but am getting very different distance ...
wyskass's user avatar
6 votes
2 answers
436 views

Splitting lines by multiple polygons, taking length of particular segment, using PostGIS

I have a table of 100k+ non-overlapping POLYGON features, and a table of 50k+ simple LINESTRING features (each line has only 2 vertices). The below is a common arrangement of these features on a map, ...
Theo F's user avatar
  • 1,839
0 votes
1 answer
1k views

Calculate length using GeoPandas

I have a shape file "Line1.shp". It has only one feature. When I calculate the length in ArcGIS Pro using "Calculate Geometry" and selecting units as "Meters" and ...
Rajesh Patnaik's user avatar
4 votes
1 answer
129 views

Getting line length of geometry of parent feature as default value in child feature in QGIS

I have: a parent line-layer 'MyParentLineLayer' (referenced layer) with a field "parent_uuid" (referenced field). a child geometryless-layer 'MyChildLayer' (referencing layer) with a field &...
user191847's user avatar
1 vote
1 answer
147 views

Making lines from points and classifying them by length in QGIS

I have a QGIS point layer with several points with no attributes except the Id field. I want to make a line from each point to the rest of the points. In addition, I would like to get two new fields, ...
david's user avatar
  • 113
6 votes
1 answer
908 views

AssertionError when applying expression to field value with PyQGIS

I am trying create new columns in an attribute table and fill them with values with expressions using Python Console in QGIS. I successfully create the new columns but when I try to fill them, I get ...
Anthony's user avatar
  • 133
2 votes
1 answer
468 views

Converting array to polyline using Arcade with ArcGIS Pro

Arcade/ArcGIS Pro 2.9: I have an array of polyline vertices: [[[670634.3148,4862051.3579,null],[670719.3321,4862051.0072,null],[670721.44381227,4862055.2956567,null], [670724.26721751,4862059.1529319,...
User1974's user avatar
  • 1,172
0 votes
1 answer
451 views

How does SDE.ST_LENGTH() get calculated?

I have an Oracle 18c SDE.ST_GEOMETRY polyline FC. The lines in the FC have true curves. If I query for the length of the lines in SQL using SDE.ST_LENGTH(SHAPE), how does the length get calculated? ...
User1974's user avatar
  • 1,172
4 votes
2 answers
486 views

Grouping and measuring total length of road based on specific attribute in QGIS

I have this dataset that describes the cycleways of a city. I want to measure the km of cycleway for each type of highway (residential, track, unclassified, ecc) and then calculate the percentage of ...
anea's user avatar
  • 161
1 vote
1 answer
3k views

Getting total length of polyline from Leaflet draw?

I'm quite new when it comes to Leaflet and this is my very first question asked here so I'm not experienced. While I was drawing polyline I noticed that you can get current distance while drawing it: ...
htopalov's user avatar
10 votes
1 answer
723 views

Calculating length of each polygon side in PostGIS

In PostGIS, I want to calculate the length of different sides of a polygon. I know how to calculate a perimeter but how to calculate length side by side? Perimeter is as a sum of side's length so I ...
GeoGyro's user avatar
  • 1,656
5 votes
1 answer
488 views

Merging line segments using length rules in QGIS

In QGIS 3, I have split a line dataset (road dataset where each road is an individual segment i.e. split at intersections) into segments using the "Split lines by maximum length" tool with ...
PollyGone's user avatar
  • 111
6 votes
1 answer
236 views

Calculating line lengths of road network in PyQGIS

I have a road network 'TR_ROAD' with EPSG:4283 crs and 1200 features. I am trying to calculate length of each line segment in road by using "length" geometry in PyQGIS. When I tried below ...
Case Msee's user avatar
  • 855
4 votes
1 answer
233 views

Calculating cumulative line length on large dataset

I have a line split into segments that I want to calculate the accumulative length for, like this: I can achieve this easily on a smaller dataset with this inbuilt function in the field calculator in ...
JUNGLE's user avatar
  • 530
0 votes
1 answer
553 views

Calculate length and width of polygons using Arcade in Expression Builder in the attribute table in ArcGIS Pro [closed]

I am using attribute rules to automatically update cells in an attribute table. I need to auto-calculate the length and width of polygons as the user creates them. Is there a way to do this using math/...
Adriana's user avatar
1 vote
2 answers
361 views

Drawing circle of a fixed radius in meter, rounding error?

I would like to provide an option to draw a circle of a fixed radius in meters. My problem is that if I enter 5 meters, I'm getting 4.99 meters if pass the LineString to sphere.getLength. My code so ...
BR75's user avatar
  • 447
6 votes
3 answers
699 views

Calculating sum of line length for hundred vector layers

I usually calculate total line length by adding a $length field and going to summary statistics. How would I do this if I have many layers? Is there a faster way? I batch added the $length to all of ...
Ben Hendel's user avatar
6 votes
2 answers
655 views

Finding the longest horizontal line inside polygon in QGIS

I have a state polygon like the pic shown below, is there a way to find the line which is the maximum horizontal line? Like this, but I want the maximum distance line.
Anand's user avatar
  • 79
0 votes
0 answers
23 views

Converting Lat Lon points to line, then calculating distance travelled in QGIS

I understand this question, or variations thereof, gets asked regularly but no matter what I try I can't seem to convert points from GPS tracks to lines, then calculate the distances travelled. This ...
Tursiops's user avatar
3 votes
1 answer
108 views

Length of shared borders between polygons using Virtual Layers

I have a map with many counties, and I estimated the length of the common borders using one of the answers from this question posted a year ago. The properties of my layer look like this: I did the ...
Quinoba's user avatar
  • 33
2 votes
1 answer
144 views

Query for calculating length of lines inside polygon gives empty output [closed]

I am writing an SQL query to calculate the length of lines inside a polygon. SELECT r.*, st_length(st_intersection(r.geometry,b.geometry)) AS Length_Inside FROM Gen_Line as r, Buffered as b WHERE ...
Varin Anand's user avatar
4 votes
1 answer
106 views

How to count the number of 100m length chunks in a table with line geometry?

And by chunks I do not mean segments so I can't use st_segmentize for this In other words I have a linetable which has many lines of varying length. Example: id | st_length(geom) | intended count for ...
Luffydude's user avatar
  • 2,328
4 votes
1 answer
193 views

Autochange length of line not working in QGIS 3

I have the line with calculated length both in meters and in feet. The problem is, that when I delete some unnecessary nodes it doesn't change at all. I tried to find some hint here: Finding line ...
Geographos's user avatar
  • 4,029

1
2 3 4 5