I'm new in QGIS and in GIS. I want to calculate distance between two points in meters using WGS 84 coordinates. I'm working with QGIS 2.0.1 Dufour and Python 2.7
The code is the following (based on http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/geometry.html?highlight=measureline#geometry-predicates-and-operations):
point1 = QgsPoint(-46.443077,-67.51561)
point2 = QgsPoint(-46.4446,-67.512778)
#Create a measure object
distance = QgsDistanceArea()
#Measure the distance
m = distance.measureLine(point1, point2)
Using this coordinates I'm getting 0.00321554863126 And in Google Maps is aproximately 290m)
Any help?
No comments:
Post a Comment