[postgis-users] making a line from a known point and direction
mwtoews at gmail.com
Tue Jul 20 19:30:03 PDT 2010
Except that you need radians .. not degrees, so multiply your degrees
by pi()/180 to convert to radians.
See this similar discussion:
On 20 July 2010 04:57, Fred Lehodey <lehodey at gmail.com> wrote:
> Hi ahmet,
> you can use something like that (and easily write a function):
> here, the point is (0 0) : ST_makepoint(0,0)
> ,azimuth is 45 and distance is 50.
> select st_makeline(st_makepoint(0,0),st_makepoint(xx,yy)) as the_geom
> ST_x(st_makepoint(0,0)) + (50 * (sin(45))) as xx,
> ST_y(st_makepoint(0,0)) + (50 * (cos(45))) as yy
> ) as foo
> On Tue, Jul 20, 2010 at 12:26 PM, ahmet temiz <ahmettemiz88 at gmail.com> wrote:
>> I want to make a linestring from a known point and known direction (as
>> azimuth) with
>> certain length.
>> how can I do that ?
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
> postgis-users mailing list
> postgis-users at postgis.refractions.net
More information about the postgis-users