Azad Rasul
SmartRS

SmartRS

20- Calculating distance between two points

Azad Rasul's photo
Azad Rasul
·Jun 25, 2021·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Listen to this article
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)

If you like the content, please SUBSCRIBE to my channel for the future content

 
Share this