<refsynopsisdiv>
<funcsynopsis>
- <funcprototype>
- <funcdef>geometry <function>ST_CurveToLine</function></funcdef>
- <paramdef><type>geometry</type> <parameter>curveGeom</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>geometry <function>ST_CurveToLine</function></funcdef>
- <paramdef><type>geometry</type> <parameter>curveGeom</parameter></paramdef>
- <paramdef><type>integer</type> <parameter>segments_per_qtr_circle</parameter></paramdef>
- </funcprototype>
<funcprototype>
<funcdef>geometry <function>ST_CurveToLine</function></funcdef>
<paramdef><type>geometry</type> <parameter>curveGeom</parameter></paramdef>
<paramdef><type>float</type> <parameter>tolerance</parameter></paramdef>
- <paramdef><type>integer</type> <parameter>tolerance_type</parameter></paramdef>
- <paramdef><type>integer</type> <parameter>flags</parameter></paramdef>
+ <paramdef choice="opt"><type>integer</type> <parameter>tolerance_type</parameter></paramdef>
+ <paramdef choice="opt"><type>integer</type> <parameter>flags</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
--
-- Availability: 2.4.0
--
-CREATE OR REPLACE FUNCTION ST_CurveToLine(geom geometry, tol float8, toltype integer, flags integer)
+CREATE OR REPLACE FUNCTION ST_CurveToLine(geom geometry, tol float8 DEFAULT 32, toltype integer DEFAULT 0, flags integer DEFAULT 0)
RETURNS geometry
AS 'MODULE_PATHNAME', 'ST_CurveToLine'
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
---
--- SQL-MM
---
--- ST_CurveToLine(Geometry geometry, SegmentsPerQuarter integer)
---
--- Converts a given geometry to a linear geometry. Each curveed
--- geometry or segment is converted into a linear approximation using
--- the given number of segments per quarter circle.
---
-CREATE OR REPLACE FUNCTION ST_CurveToLine(geometry, integer)
- RETURNS geometry AS 'SELECT ST_CurveToLine($1, $2::float8, 0, 0)'
- LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
---
--- SQL-MM
---
--- ST_CurveToLine(Geometry geometry, SegmentsPerQuarter integer)
---
--- Converts a given geometry to a linear geometry. Each curveed
--- geometry or segment is converted into a linear approximation using
--- the default value of 32 segments per quarter circle
-CREATE OR REPLACE FUNCTION ST_CurveToLine(geometry)
- RETURNS geometry AS 'SELECT ST_CurveToLine($1, 32::integer)'
- LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
CREATE OR REPLACE FUNCTION ST_HasArc(Geometry geometry)
RETURNS boolean
DROP AGGREGATE IF EXISTS ST_AsGeobuf(text, anyelement);
DROP FUNCTION IF EXISTS pgis_asgeobuf_transfn(internal, text, anyelement);
DROP FUNCTION IF EXISTS pgis_asmvt_transfn(internal, text, int4, text, anyelement);
+-- Going from multiple functions to default args
+-- Need to drop old multiple variants to not get in trouble.
+DROP FUNCTION IF EXISTS ST_CurveToLine(geometry, integer);
+DROP FUNCTION IF EXISTS ST_CurveToLine(geometry);
DROP VIEW IF EXISTS geometry_columns; -- removed cast 2.2.0 so need to recreate