GeometryPoint.From
ValueCreates a record representing a geometric point from its constituent parts such as X coordinate, Y coordinate, and optional Z coordinate.
Syntax
GeometryPoint.From(x as number, y as number, optional z as nullable number, optional m as nullable number, optional srid as nullable number) as recordParameters
| Name | Type | Required | Description |
|---|---|---|---|
x | number | Yes | The X coordinate of the geometric point. |
y | number | Yes | The Y coordinate of the geometric point. |
z | number | No | The Z coordinate (elevation or depth) of the geometric point. Omit if not applicable. |
m | number | No | The measure (M value) associated with the geometric point. Omit if not applicable. |
srid | number | No | The Spatial Reference Identifier (SRID) for the point. Defaults to 0 if not specified. |
Return Value
record — A structured record representing a geometric point with the specified coordinates.
Remarks
GeometryPoint.From creates a structured record representing a geometric point from individual coordinate values. This provides a convenient way to construct geometric point values without needing to write WKT strings.
The function uses a flat Cartesian (planar) coordinate system. The x and y parameters specify the point's position on the plane. Unlike geographic points which use longitude/latitude on a round-earth model, geometric points operate in a flat coordinate space suitable for floor plans, engineering drawings, or projected map coordinates.
The optional z parameter represents a third dimension (often elevation or depth), and the optional m parameter represents an arbitrary measure value (often used for linear referencing). The optional srid parameter specifies the Spatial Reference Identifier; if omitted, it defaults to 0.
The resulting record can be serialized to WKT format using Geometry.ToWellKnownText, making it easy to round-trip geometric data between structured records and text representations.
For round-earth geographic points using longitude and latitude, use GeographyPoint.From instead.
Examples
Example 1: Create a geometric point
let
Point = GeometryPoint.From(10, 20)
in
Record.ToTable(Point)Example 2: Create geometric points with a Z coordinate
let
Points = #table({"Label", "X", "Y", "Z"}, {
{"Sensor A", 100, 200, 5.5},
{"Sensor B", 150, 250, 3.2}
}),
WithGeo = Table.AddColumn(Points, "GeoPoint", each GeometryPoint.From([X], [Y], [Z]))
in
WithGeoExample 3: Create a point and convert to WKT
let
Point = GeometryPoint.From(50, 75),
WKT = Geometry.ToWellKnownText(Point, true)
in
#table({"Label", "WKT"}, {{"Center", WKT}})