Re: [postgis-users] Get point certain degree of another point

2010-03-01 Thread Maelvon HAWK
Le 28/02/2010 17:11, Mike Toews a écrit : Apply the same COGO trigonometry as before[1]: import math class Point: def __init__(self, x, y): self.x=x; self.y=y def TranslateBearingDistance(pt, rad, dist): return Point(pt.x + dist*math.cos(rad), pt.y + dist*math.sin(rad))

Re: [postgis-users] Get point certain degree of another point

2010-02-28 Thread Mike Toews
Apply the same COGO trigonometry as before[1]: import math class Point: def __init__(self, x, y): self.x=x; self.y=y def TranslateBearingDistance(pt, rad, dist): return Point(pt.x + dist*math.cos(rad), pt.y + dist*math.sin(rad)) pt0 = Point(100, 100) # 12 units away at 30

Re: [postgis-users] Get point certain degree of another point

2010-01-24 Thread tommy408
Thank you Marc and Mike Mike Toews wrote: On 2010-01-22 19:05, tommy408 wrote: How can I get a point at a certain distance and degree from another point. For example 10 meter distance to another point at 45 degrees. You could also use some simple trigonometry with ST_Translate().

Re: [postgis-users] Get point certain degree of another point

2010-01-23 Thread Marc Jansen
Hi tommy408, I would construct a horizontal line with your starting point and the distance you need and afterwards rotate that line using ST_Rotate http://postgis.refractions.net/documentation/manual-svn/ST_Rotate.html The new endpoint should be what you are searching. Regards, Marc

Re: [postgis-users] Get point certain degree of another point

2010-01-23 Thread Mike Toews
On 2010-01-22 19:05, tommy408 wrote: How can I get a point at a certain distance and degree from another point. For example 10 meter distance to another point at 45 degrees. You could also use some simple trigonometry with ST_Translate(). For example, consider 'geom' at (100 100), and a