Questions tagged [length]

The longest extent of anything as measured from end to end

Filter by
Sorted by
Tagged with
3 votes
2 answers
87 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 ...
  • 475
1 vote
1 answer
23 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 ...
  • 141
1 vote
0 answers
38 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 ...
1 vote
0 answers
40 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 ...
0 votes
2 answers
72 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&...
2 votes
0 answers
41 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 ...
  • 71
4 votes
1 answer
117 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 ...
1 vote
1 answer
41 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 ...
0 votes
0 answers
27 views

Null cells - length calculator

I have zero cells when entering the code. No errors in the console. Why? QGIS 3.16 fn = 'H:/roadst.shp' layer= QgsVectorLayer(fn, '', 'ogr') pv = layer.dataProvider() pv.addAttributes([QgsField('...
0 votes
0 answers
54 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 ...
6 votes
2 answers
319 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, ...
  • 1,667
0 votes
1 answer
216 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 ...
3 votes
1 answer
75 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 &...
1 vote
1 answer
73 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, ...
  • 103
6 votes
1 answer
434 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 ...
  • 133
2 votes
1 answer
273 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,...
  • 986
0 votes
1 answer
138 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? ...
  • 986
4 votes
2 answers
273 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 ...
  • 161
1 vote
1 answer
1k 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: ...
10 votes
1 answer
371 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 ...
  • 1,399
4 votes
1 answer
259 views

Merging line segments using length rules in QGIS 3

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 ...
  • 101
6 votes
1 answer
203 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 ...
  • 835
4 votes
1 answer
160 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 ...
  • 470
0 votes
1 answer
200 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/...
1 vote
2 answers
254 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 ...
  • 435
6 votes
3 answers
470 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 ...
6 votes
2 answers
473 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.
  • 79
0 votes
0 answers
21 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 ...
3 votes
1 answer
76 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 ...
  • 33
2 votes
1 answer
92 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 ...
4 votes
1 answer
93 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 ...
  • 2,238
4 votes
1 answer
107 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 ...
  • 3,663
2 votes
2 answers
192 views

Calculating the length of two shapefiles in QGIS

I created the yellow area as a shapefile by hand. Then I calculated the perimeter. I also created another shapefile (blue) manually and calculated the length, see image 1. The next step was to ...
  • 55
0 votes
0 answers
55 views

Calculating the greatest length of a polygon using QGIS [duplicate]

I'm new to QGIS and I need to know the easiest way to calculate the greatest length of a polygon. I already know the "rule" tool but I want to do it automatically because I have a huge ...
11 votes
3 answers
3k views

Calculating semi-major and semi-minor axis length of an ellipse in QGIS

I have a layer that contains ellipse-shaped geometries. The layer has projected CRS and there are also rotated ellipses in the layer. I couldn't find a tool or plugin related to semi-major and semi-...
0 votes
0 answers
223 views

Calculating the longest path length in drainage network using Python

I have a drainage network and I want to obtain the longest path length between two coordinates of the shapefile; is there is a way to automate this process in Python? For example, in the image, I want ...
2 votes
0 answers
77 views

Selecting, sorting, and grouping spatial data (lines) by length and proximity

I'm working on a project where I have a bunch of lines inside of polygonal land parcels. Here's a rough sketch of what I'm talking about: I need to further subdivide these parcels into sections that ...
2 votes
2 answers
718 views

Calculating distance between points from CSV file in QGIS

I have a CSV-file with latitudes and longitudes and I should calculate the distance between the points in ascending order (distance from 1 to 2, from 2 to 3, etc.) I tried with the distance matrix but ...
  • 43
5 votes
1 answer
715 views

Automatically updating geometry attributes in QGIS without using Virtual Fields

I have a line layer and I computed the attribute "length" with the field calculator. After that, I changed the geometry of some lines with the editing toolbar. That means the values of "...
  • 2,157
2 votes
1 answer
131 views

Creating points along line based on line lengths

I have a road network network (polyline shape layer) with multiple line lsegments. Each line segment has different line length as shown in image 1. I am trying to generate points along lines based on ...
  • 835
3 votes
4 answers
523 views

Measuring distance between two points on curve line in QGIS

I am using QGIS 3.10 version. Image those two blue lines are points. How to measure the white line between those points?
1 vote
2 answers
88 views

Does SDE.ST_LENGTH() calculate the true length of arcs?

Oracle 18c/10.7.1 EGDB I have a polyline FC that has features with arcs. Does the Oracle SDE.ST_LENGTH() function calculate the true length of arcs? Or does it only calculate the straight-line length ...
  • 986
2 votes
0 answers
307 views

Calculating length along multiple line segments in GeoPandas [closed]

I would like to calculate the distance between two points. They are connected with multiple line segments. Each LineString only consisting out of two points. How do I connect these LineString segments ...
1 vote
1 answer
167 views

An application for measuring river length?

I'm aware of the coastline paradox and its application to rivers in that the measured length of a river depends on the resolution of the measurement. Is there an application that calculates the centre ...
  • 21
8 votes
2 answers
594 views

What is the maximum number of characters for a label in QGIS 3?

I am trying to determine the maximum number of characters for a label in QGIS 3. I am at over 1,000 characters and it does not display. Is there another way to display text on a map with a large ...
  • 395
2 votes
1 answer
212 views

Calculating length of line shapefile using PyQGIS

I have two lines that overlap, so I clip the overlap, and I should get its length in kilometers. The clip part is ok but I can't find any resources on how to get the length. It can be printed in the ...
  • 1,199
1 vote
2 answers
33 views

Measuring length in Southeast Korea projection

I have a GIS dataset currently projected in Web Mercator. Is there an option for a more accurate segmentation length projection when I need accurate lengths in Southeast Korea?
0 votes
0 answers
534 views

AttributeError: 'NoneType' object has no attribute 'length' when running function for compactness

I want to calculate compactness indices for geometries I have in a geodataframe. I'm using the following function as was mentioned here (Measuring compactness in Python) by Kadir in order to ...
  • 1,919
1 vote
1 answer
124 views

Increasing length lines of shape

I am using ArcGIS Desktop Advanced 10.8. I have a polyline shape and I need to increase the length of all the lines 1000 meters. The lines have 2 vertex only. I need to increase the length from the ...
  • 75
4 votes
2 answers
429 views

Creating field with cumulative values of line length in QGIS

I've been through some of the examples and solutions posted here for calculating chainage of a line or cumulative values. However, I am still unable to achieve the desired outcome. What I am trying to ...
  • 395

1
2 3 4 5