Usually, Euclidean distance is defined as squareroot((x1 - x2)^2 - (y1-y2)^2)
but, instead of having x
and y
values you have a cell size of 20
.
How can to calculate the Euclidean distance between the yellow boxes?
Further context:
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityUsually, Euclidean distance is defined as squareroot((x1 - x2)^2 - (y1-y2)^2)
but, instead of having x
and y
values you have a cell size of 20
.
How can to calculate the Euclidean distance between the yellow boxes?
Further context:
In this specific case, given cell size 20 and measuring distance to/from the centre of the cells:
x=20 y=60. Therefore: d=63.245
This is a specific answer, to solve for other cases we need to know the relative position of the cells. A formula in that case would be:
d = √( ( cellsize(cell2y-cell1y) )²+( cellsize(cell2x-cell1x) )² )
i.e. d = √(4000) = 63.245