Re: How to calculate length of path data without diagonals? - Mailing list pgsql-general

From John R Pierce
Subject Re: How to calculate length of path data without diagonals?
Date
Msg-id 4D1394DB.5070906@hogranch.com
Whole thread Raw
In response to How to calculate length of path data without diagonals?  (Romain Billoir <billoirr@gmail.com>)
List pgsql-general
On 12/23/10 10:25 AM, Romain Billoir wrote:
> Hi, i need to calculate some length of path without diagonal. Some
> examples:
> length((5,5),(6,6))) returns 1.41. I need 2: 5,5 to 5,6 + 5,6 to 6,6.
>
> Is that possible?

a path of just two points?   something like   abs(x1-x2) + abs(y1-y2).

pgsql-general by date:

Previous
From: Romain Billoir
Date:
Subject: How to calculate length of path data without diagonals?
Next
From: Adrian Klaver
Date:
Subject: Re: Data backup to local duplicate without resetting permissions