Sei sulla pagina 1di 2

PostGIS 1.5.

1 Manual
222 / 315

This method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1. s2.1.1.3
This method implements the SQL/MM specification. SQL-MM 3: 5.1.16
This function supports 3d and will not drop the z-index.

Examples
--Get estimate of infected area based on point observations
SELECT d.disease_type,
ST_ConvexHull(ST_Collect(d.the_geom)) As the_geom
FROM disease_obs As d
GROUP BY d.disease_type;

Convex Hull of a MultiLinestring and a MultiPoint seen together with the MultiLinestring and MultiPoint
SELECT ST_AsText(ST_ConvexHull(
ST_Collect(
ST_GeomFromText(MULTILINESTRING((100 190,10 8),(150 10, 20 30))),
ST_GeomFromText(MULTIPOINT(50 5, 150 30, 50 10, 10 10))
)) );
---st_astext-POLYGON((50 5,10 8,10 10,100 190,150 30,150 10,50 5))

See Also
ST_Collect, ST_MinimumBoundingCircle

7.9.5 ST_CurveToLine
Name
ST_CurveToLine Converts a CIRCULARSTRING/CURVEDPOLYGON to a LINESTRING/POLYGON

PostGIS 1.5.1 Manual


223 / 315

Synopsis
geometry ST_CurveToLine(geometry curveGeom);
geometry ST_CurveToLine(geometry curveGeom, integer segments_per_qtr_circle);

Description
Converst a CIRCULAR STRING to regular LINESTRING or CURVEPOLYGON to POLYGON. Useful for outputting to devices that cant support CIRCULARSTRING geometry types
Converts a given geometry to a linear geometry. Each curved geometry or segment is converted into a linear approximation using
the default value of 32 segments per quarter circle
Availability: 1.2.2?
This method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1.
This method implements the SQL/MM specification. SQL-MM 3: 7.1.7
This function supports 3d and will not drop the z-index.
This method supports Circular Strings and Curves

Examples
SELECT ST_AsText(ST_CurveToLine(ST_GeomFromText(CIRCULARSTRING(220268 150415,220227
150505,220227 150406))));

--Result -LINESTRING(220268 150415,220269.95064912 150416.539364228,220271.823415575 150418.17258804,220273.613787707 150419.895736857,


220275.317452352 150421.704659462,220276.930305234 150423.594998003,220278.448460847 150425.562198489,
220279.868261823 150427.60152176,220281.186287736 150429.708054909,220282.399363347 150431.876723113,
220283.50456625 150434.10230186,220284.499233914 150436.379429536,220285.380970099 150438.702620341,220286.147650624 150441.066277505,
220286.797428488 150443.464706771,220287.328738321 150445.892130112,220287.740300149 150448.342699654,
220288.031122486 150450.810511759,220288.200504713 150453.289621251,220288.248038775 150455.77405574,
220288.173610157 150458.257830005,220287.977398166 150460.734960415,220287.659875492 150463.199479347,
220287.221807076 150465.64544956,220286.664248262 150468.066978495,220285.988542259 150470.458232479,220285.196316903 150472.81345077,
220284.289480732 150475.126959442,220283.270218395 150477.39318505,220282.140985384 150479.606668057,
220280.90450212 150481.762075989,220279.5637474 150483.85421628,220278.12195122 150485.87804878,
220276.582586992 150487.828697901,220274.949363179 150489.701464356,220273.226214362 150491.491836488,
220271.417291757 150493.195501133,220269.526953216 150494.808354014,220267.559752731 150496.326509628,
220265.520429459 150497.746310603,220263.41389631 150499.064336517,220261.245228106 150500.277412127,
220259.019649359 150501.38261503,220256.742521683 150502.377282695,220254.419330878 150503.259018879,

Potrebbero piacerti anche