ST_TessellateGeog¶
Converts a geometry to geography, densifying edges to approximate planar lines as geodesic segments.
Usage¶
geography ST_TessellateGeog(geom: geometry, tolerance: double)
Arguments¶
- geom (geometry): Input geometry
- tolerance (double)
Description¶
Converts a geometry to a geography while tessellating edges using spherical (geodesic) interpolation. The tolerance parameter specifies the maximum deviation in meters between the original edge and the tessellated approximation. This is useful when converting planar geometries to geographies where edges need to follow geodesic paths on the sphere.
Examples¶
SELECT ST_TessellateGeog(
ST_GeomFromText('LINESTRING (-10 50, 10 50)'),
1000
);
┌──────────────────────────────────────────────────────────────────────────────┐
│ st_tessellategeog(st_geomfromtext(Utf8("LINESTRING (-10 50, 10 50)")),Int64( │
│ 1000))… │
╞══════════════════════════════════════════════════════════════════════════════╡
│ LINESTRING(-10 50,-7.499999999999999 50,-5 50,-2.5 50,0 50,2.5 50,5 50,7.49… │
└──────────────────────────────────────────────────────────────────────────────┘