orbisgis / h2gis

A spatial extension of the H2 database.
http://www.h2gis.org
GNU Lesser General Public License v3.0
208 stars 63 forks source link

Add two functions to create an elliptical arc as line or polygon. #1356

Closed ebocher closed 1 year ago

ebocher commented 1 year ago

This PR adds two function to create an elliptical arc as line or polygon from a given point, a distance, a start angle and the size of it in radians.

Fix ST_MakeEllipse to keep the srid of the centre point

Exemple :


SELECT ST_ACCUM(the_geom) from (SELECT ST_MakeArcPolygon('POINT (0 0)'::GEOMETRY,  X*10, 
                CASE WHEN X=1 THEN 0 ELSE PI()/X END, PI()/X+1) as the_geom 
                FROM generate_series(1, 3)) as foo

geoms