Azad Rasul
SmartRS

SmartRS

20- Calculating distance between two points

Azad Rasul's photo
Azad Rasul

Published on Jun 25, 2021

1 min read

Subscribe to my newsletter and never miss my upcoming articles

from qgis.core import QgsDistanceArea

d = QgsDistanceArea()
d.setEllipsoid('WGS84')


Erbil = QgsPointXY(44.01, 36.19)
Duhok = QgsPointXY(42.99, 36.86)

distance = d.measureLine([Erbil, Duhok])
print(distance/1000)
 
Share this
Proudly part of