mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	closest_point: returns closest point a geometry to a second geometry shortest_line: returns the shortest possible line joining two geometries
		
			
				
	
	
		
			16 lines
		
	
	
		
			605 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			605 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
{
 | 
						|
  "name": "shortest_line",
 | 
						|
  "type": "function",
 | 
						|
  "description": "Returns the shortest line joining geometry 1 to geometry 2. The resultant line will start at geometry 1 and end at geometry 2.",
 | 
						|
  "arguments": [
 | 
						|
    {"arg":"geometry 1","description":"geometry to find shortest line from"},
 | 
						|
    {"arg":"geometry 2","description":"geometry to find shortest line to"}
 | 
						|
  ],
 | 
						|
  "examples": [
 | 
						|
    {
 | 
						|
      "expression":"geom_to_wkt(shortest_line(geom_from_wkt('LINESTRING (20 80, 98 190, 110 180, 50 75 )'),geom_from_wkt('POINT(100 100)')))",
 | 
						|
      "returns":"LineString(73.0769 115.384, 100 100)"
 | 
						|
    }
 | 
						|
  ]
 | 
						|
}
 |