Questions tagged [length]

The longest extent of anything as measured from end to end

135 questions
4k views

Looking for a pythonic way to calculate the length of a WKT linestring

I was quite unsatisfied with Calculating Length of Linestrings in WGS84 in Miles. It kept me wondering if there is a more convenient, Pythonic way to calculate the length of a WKT linestring according ...
2k views

POSTGIS get the max length of the polygon and the average width

I have in postgis a polygon type table. I need to calculate automatically the maximum length of the polygon: And the second one is the average width: I am doubting rigth now if this is possible as ...
15k views

Understanding terms in Length of Degree formula?

Online calculators such as http://www.csgnetwork.com/degreelenllavcalc.html (view page source) use the below formulas to get meters per degree. I understand in general how distance per degree varies ...
11k views

What is unit of shapely length attribute?

I'm doing a very simple calculation of the length of a polyline using shapely: from shapely.geometry import LineString ... xy_list = [map(float,e) for e in xy_intm] line = LineString(xy_list) s = '%...
658 views

Deciding length of shapefile fields?

At my work have inherited several shapefiles that originate from MapInfo that I am bringing into a new project in QGIS. I have the opportunity to change the column names, add and subtract columns and ...
14k views

What units are shape_length in?

When generating polylines from a series of points, I used "Points to Line" tool. From this, Arc generates a polyline feature class, which includes the attribute shape_length. What units are these ...
12k views

Calculating line segment lengths within polygon using ArcGIS Desktop?

I have a layer with line segments and a layer of polygons (in this case, buffers around points). I need to create a new field for each polygon that contains the total length of all line segments ...
7k views

Finding line length while editing in QGIS?

I am using QGIS. I would like to know if there is any way during the editing phase of a vector (line or polygon) to know the length of the line (total and partial) that is being created?
452 views

Length of line differs depending on query method

We are doing a check of a length attribute against the Shape Length in all our line feature classes (maybe 40 feature classes and 200,000+ features). In the length attribute we round the Shape Length ...
3k views

Calculating the length of the network lines inside polygon in QGIS 2.10.1

I am working with 2 datasets: delineations of the neighbourhoods traffic network. This is how they look: I would like to calculate the length of the roads per neighbourhood (polygon). As you may ...
3k views

How to measure length of line accurately?

In postgis 1.5 for the below given query the answer is 1540651.62674101 meters , SELECT ST_Length(ST_GeomFromText('LINESTRING(77.83042478941326 9.98463896136159,78.03469506809812 23.90398909552571 )'...
1k views

How to create line with exact same length over and over again?

I need to draw 30 meter lines in specific places. Ctrl+l is too annoying to do everytime. Is there a easy way to define specific same length for a line that I need to draw many times?
2k views

What's the unit of measurements produced by “sum line lengths”?

My goal is to find the total length of roads per county for a particular state. You would think there would be a simple government spreadsheet with this information in it.... I cannot figure out how ...
1k views

How to emulate a specific vector grid in QGIS?

I would like to analyze data included in a pdf file. The file contains information on characteristics of 16km grid cells for a specific study area. The file also includes a map displaying the grid. I ...
522 views

Permanently setting polygon/polyline segment length using ArcGIS Desktop?

I'm trying to create a several hundred polygons in ArcGIS 10, each of which may have up to several hundred vertices. For consistency sake I would like each line segment in these polygons to be of a ...
7k views

How to create a rectangle polygon with set lengths in QGIS?

I have a search area i want to outline. and i need it to be 1km by 2km. is it possible to achieve this in QGIS. I can create a rectangle polygon but only guess the lengths.
97 views

Different length measures in QGIS vs. ArcMap

I noticed that QGIS and ArcMap return slightly different length measures when calculating geometries (length) on one and the same shapefile (see image). In QGIS I used the \$length command, in ArcMap ...
1k views

Why is sum of st_length() of segments 20% too big?

I'm running a query to return the total length of some bike paths, from OpenStreetMap. Compared to the known actual length of these paths, they're all a bit too big - something like 10-30%. I know it ...
228 views

Measurement not correct in QGIS 1.8 [closed]

I have a SHP file of sub-areas of U.S. counties (roughly about the size of a Census tract) that I've reprojected into a 'true distance' projection (World Equidistant Cylindrical) in QGIS 1.8. However, ...
283 views

How is the st_length function stored in an Oracle geodatabase?

How is the st_length function stored in an Oracle geodatabase? Is it in a: PL/SQL function Separate .dll library Somewhere else? I've noticed that the sde.st_length function works, even when the ...
274 views

OGR2OGR how to update a new column by the length of polyline

Hi I can update new column with area of a polygon object, but don't know, how to update new column in polyline layer with length of polyline. This works very well for AREA: for %%f in (*.tab) do ( ...
2k views

Using Calculate Field (Data Management) tool to calculate 3D Length in ArcGIS 10.1

I'm relatively new to the world of model builder and scripting, so it's likely there is a very simple solution to the question I've been trying to figure out. I'm trying to create a tool that takes ...
65 views

Incorrect measurement of intersection between polygons

I have a map divided in parts using polygons, and I want to measure the length of the boundary between each pair. I am using this script from a tutorial to find the actual neighbors, and then measure ...
251 views

QGIS: Displaying total length of lines in print composer legend

In the print composer (also in the layer selector) I can choose to automatically display the amount of objects in that category in square brackets. That is useful for point features/layers. But in the ...
73 views

Loop distance point PyQGIS

I have a .shp of lines where I'm able to calculate the sum of segments length but I'm trying to put a point at a given distance in meters. The problem is it puts a point at every segment. When I give ...
291 views

Calculate length of huge vector lines dataset

I have a MultiLineString vector layer from which I would like to calculate the length. I have tried to calculate the length with the Field Calculator by putting in the expression \$length. The ...
14k views

Polyline length calculation in ArcGIS 10/VB script

I used to run this length calc on my data in ArcGIS 8 and 9, and now it don't work in ArcGIS10. Can you tell me what I have done wrong? Dim dbllength as double Dim pcurve as icurve Set Pcurve = [...
1k views

How to measure the length/area of a line/polygon by just selecting it?

I can get what I want by using this code but have to do it everytime i select. The geometry of the features are small (city scale). layer = qgis.utils.iface.activeLayer() features = layer....
675 views

How to calculate path length of each point from the start using arcpy?

As shown in the picture below I would like to calculate the path length of each point from the start. Can anyone give me some help in writing this in python for ArcGIS?
3k views

Get LineString length in meters (Python, GEODjango)

In a Django model, I have a LineString field which holds GPS coordinates of a street route. I know that I the .length holds the length of the LineString, but I don't know what unit the returned value ...
3k views

How to Calculate length of polyline geometry for several tables in PostGIS?

PostGIS database contains several geometry (polyline) tables (with names "D1_r", "D2_r", "D3_r"). I calculate length for one "postgis layer" use request: SELECT sum(ST_Length_Spheroid(the_geom,'...
1k views

ArcGIS Surface Length Tool equivalent in FME?

I am trying to calculate the 3D length of a line. I currently have a rather complex and cumbersome model built in ArcGIS ModelBuilder that uses a tool called "Surface Length". I was wondering if ...
639 views

Measure length of each segment for a polygon in Postgis

I have a polygon table in PostGIS and need to calculate the length of each line segment. How can I achieve this? I have done it in QGIS but would prefer to do it in the database. I have found ...
654 views

Measuring polyline lengths running through a raster - is this possible?

I have a reclassified raster layer with 4 values and a vector layer of polylines. I would like to discover the length of the lines running through each raster value, or the percentage of the lines ...
165 views

Get 3D length of line from contours (as attribute)

I have a road feature class (not currently Z enabled), and a contour feature class (which has elevations as an attribute). How can I generate the 3d length of roads as an attribute? Environment: ...
2k views

Problem about converting raster to polyline and calculating total length

I have raster file of line segment. I need to convert it to line and get the distance of that line. How can i do using Python and ArcGIS 10? I have tried with GIS tools Convert Raster to Polyline but ...
2k views

How to get turn angle, line orientation and line length in ArcMap 9.3.1?

I am mapping and analysing animal movements using arcgis 9.3.1 along with Hawthorne Beyer's GME, and am trying to utilise the correlated random walk commands, but in order to do this I need to find ...
2k views

How to convert length in Decimal degrees to meters programmatically?

I'm new to qgis and I want to find the length of some roads in a map. So I used the following code, from shapely.wkb import loads def getLength(): layer = qgis.utils.iface.mapCanvas().currentLayer()...
368 views

Sum line length with clip intersect? [closed]

SELECT sum(st_length(st_intersection(POLY.geom, LINE.geom))) AS sum_line_length... Is this function OK to calculate the sum of lines length? Wonder if it do the clip line where one line go from one ...
44 views

Lines length plugin - QgsVectorLayer error

Several similar questions have already been made, but none of the is helping me. I have a layer of polygons and I want to known the length of each line of each polygon. And based on the length I ...
67 views

QGIS - Parallel Lines - Count length of one

I have a large layer of lines (telecommunication duct) with in parts several parallel lines that are close to each other (cause they lay in the same trench). I would like to count the length of the ...
231 views

Wrong length values on QGIS 3.0.3 and 3.2

While using QGIS 3.x today I noticed that length values were not calculated and measured correctly on EPSG:32611. Calculating and measuring the same data on QGIS 2.18 latest LTR and 2.2 on EPSG:32611 ...
1k views

FME - calculating distance to points along a line

I am new to FME, and trying to get my head around what should be pretty straightforward issues, but I find myself going around in circles Basically I want to determine the distance (chainage) to a ...
6k views

Calculating sum of geometric length of shapefile in ArcGIS Desktop?

I have a shapefile with lots of line routes. I projected it and calculated the length using calculate geometry. How can I get the sum of all these routes in ArcGIS Desktop?
94 views

Is there a way to calculate length of linestring from one point to another?

If I have one linestring and coordinates of two points on that linestring, what is the easiest way to calculate not shortest distance from those two points, but distance over the given road (given ...
128 views

Flow Mapper wrong line length calculation

I'm finding some trouble with the length calculation in the Flow Mapper plugin. As you can see in the picture below the length of the 2 lines C001-C021 = 4233.7986... C001-C009 = 6069.3053... is ...
56 views

Calculate common length of two lines using ArcGIS Desktop?

I have a shapefile that consists of around 800 different lines. Now i have another shapefile which also consists line data. Is there a method which can help me calculate the shared length in the ...
225 views

Changing parallel line length to split polygon in QGIS?

I have a polygon which I want to split with a selected line with a parallel line. I have made the parallel line but it's lenght is not enought to split the polygon. It necessary to be parallel with ...