mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	of a LineGeometry type geometry using QgsLineString::length3D(). If the geometry is not a 3D line string, it returns its 2D length.
		
			
				
	
	
		
			9 lines
		
	
	
		
			736 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			736 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
{
 | 
						|
  "name": "length3D",
 | 
						|
  "type": "function",
 | 
						|
  "groups": ["GeometryGroup"],
 | 
						|
  "description": "Calculates the 3D length of a geometry line object. If the geometry is not a 3D line object, it returns its 2D length. Calculations are always planimetric in the Spatial Reference System (SRS) of this geometry, and the units of the returned length will match the units for the SRS. This differs from the calculations performed by the $length function, which will perform ellipsoidal calculations based on the project's ellipsoid and distance unit settings.",
 | 
						|
  "arguments": [ {"arg":"geometry","description":"line geometry object"}],
 | 
						|
  "examples": [ { "expression":"length3D(geom_from_wkt('LINESTRINGZ(0 0 0, 3 0 4)'))", "returns":"5.0"}]
 | 
						|
}
 |