PostGIS

ST_Project

Prev

8.12. Measurement Functions

Next

Name

ST_Project — Returns a point projected from a start point by a distance and bearing (azimuth).

Synopsis

geography +`*`+ST_Project*(`geography `g1, float distance, float azimuth`)`;

Description

Returns a point projected from a start point along a geodesic using a given distance and azimuth (bearing). This is known as the direct geodesic problem.

The distance is given in meters. Negative values are supported.

The azimuth (also known as heading or bearing) is given in radians. It is measured clockwise from true north (azimuth zero). East is azimuth π/2 (90 degrees); south is azimuth π (180 degrees); west is azimuth 3π/2 (270 degrees). Negative azimuth values and values greater than 2π (360 degrees) are supported.

Availability: 2.0.0

Enhanced: 2.4.0 Allow negative distance and non-normalized azimuth.

Example: Projected point at 100,000 meters and bearing 45 degrees

SELECT ST_AsText(ST_Project('POINT(0 0)'::geography, 100000, radians(45.0)));
--------------------------------------------
 POINT(0.635231029125537 0.639472334729198)

See Also