Table of Contents

Class Wkt

Namespace
GeometryHelper.Export
Assembly
GeometryHelper.dll

Writes shapes as well-known text, which GIS tools, databases and online viewers read.

public static class Wkt
Inheritance
Wkt
Inherited Members

Remarks

Every ring is written closed, its first point repeated at the end, as the format asks. A polygon's boundary goes counter-clockwise and its holes clockwise. Coordinates are written exactly, as a text that reads back to the very double on .NET Framework and on .NET 10 alike (the digits may differ between the two, a negative nought is -0 on both). A curve has no well-known text that online viewers and most tools read, so circles, arcs, ellipses, chains with arcs and splines are written through chords, no further from the curve than the chord tolerance asked for, a chord shorter than the point tolerance written all the same, and a ray or a line without ends through a length. A body or a ball is written as a POLYHEDRALSURFACE Z of triangles.

Methods

Write(GeoArc2, double)

Writes an arc as a chain, cut into chords no further than a tolerance from it: LINESTRING (...), from the start of the arc to its end whichever way it turns.

Write(GeoArc3, double)

Writes an arc in space as a chain, cut into chords no further than a tolerance from it: LINESTRING Z (...).

Write(GeoCircle2, double)

Writes a circle as a polygon, cut into chords no further than a tolerance from it: POLYGON ((...)).

Write(GeoCircle3, double)

Writes a circle in space as a polygon, cut into chords no further than a tolerance from it: POLYGON Z ((...)), counter-clockwise about its normal.

Write(GeoEllipse2, double)

Writes an ellipse as a polygon, cut into chords no further than a tolerance from it: POLYGON ((...)), counter-clockwise.

Write(GeoEllipse3, double)

Writes an ellipse in space as a polygon, cut into chords no further than a tolerance from it: POLYGON Z ((...)), counter-clockwise about its normal.

Write(GeoFace2)

Writes a face with its holes: POLYGON ((...), (...)).

Write(GeoFace3)

Writes a face in space with its holes: POLYGON Z ((...), (...)).

Write(GeoLine2)

Writes a segment: LINESTRING (...).

Write(GeoLine3)

Writes a segment in space: LINESTRING Z (...).

Write(GeoPoint2)

Writes a point: POINT (x y).

Write(GeoPoint3)

Writes a point in space: POINT Z (x y z).

Write(GeoPolygon2)

Writes a polygon: POLYGON ((...)).

Write(GeoPolygon3)

Writes a polygon in space: POLYGON Z ((...)).

Write(GeoPolygonArc2, double)

Writes a loop with arcs, each arc cut into chords no further than a tolerance from it: POLYGON ((...)), counter-clockwise.

Write(GeoPolygonArc3, double)

Writes a loop with arcs in space, each arc cut into chords no further than a tolerance from it: POLYGON Z ((...)).

Write(GeoPolyline2)

Writes a chain: LINESTRING (...).

Write(GeoPolyline3)

Writes a chain in space: LINESTRING Z (...).

Write(GeoPolylineArc2, double)

Writes a chain with arcs, each arc cut into chords no further than a tolerance from it: LINESTRING (...).

Write(GeoPolylineArc3, double)

Writes a chain with arcs in space, each arc cut into chords no further than a tolerance from it: LINESTRING Z (...).

Write(GeoRay2, double)

Writes a ray as a segment from its origin for a length, as a ray has no end of its own: LINESTRING (...).

Write(GeoRay3, double)

Writes a ray in space as a segment from its origin for a length: LINESTRING Z (...).

Write(GeoRectangle2)

Writes a rectangle: POLYGON ((...)), counter-clockwise.

Write(GeoSolid3)

Writes a body as the triangles of where its material ends: POLYHEDRALSURFACE Z (((...)), ((...))).

Write(GeoSphere3, double)

Writes a ball as the triangles of its surface, no further than a tolerance from the sphere: POLYHEDRALSURFACE Z (((...)), ((...))), wound outwards.

Write(GeoSpline2, double)

Writes a spline as a chain, cut into chords no further than a tolerance from it: LINESTRING (...), from the start of the spline to its end.

Write(GeoSpline3, double)

Writes a spline in space as a chain, cut into chords no further than a tolerance from it: LINESTRING Z (...), as Write(GeoSpline2, double) writes one in the plane.

Write(GeoTriangle2)

Writes a triangle: POLYGON ((...)), counter-clockwise whichever way it was given.

Write(GeoTriangle3)

Writes a triangle in space: POLYGON Z ((...)), its corners in the order they were given.

Write(GeoXLine2, double)

Writes a line without ends in the plane as a segment of a length, centred on its origin, as it has no end of its own: LINESTRING (...).

Write(GeoXLine3, double)

Writes a line without ends in space as a segment of a length, centred on its origin: LINESTRING Z (...).

Write(GeoMesh2)

Writes a mesh of the plane: MULTIPOLYGON (((...)), ((...))), a polygon to each face.

Write(GeoMesh3)

Writes a flat mesh in space: MULTIPOLYGON Z (((...)), ((...))), a polygon to each face.

Write(IEnumerable<GeoFace2>)

Writes several faces: MULTIPOLYGON (((...)), ((...))), such as what a boolean gives back.

Write(IEnumerable<GeoFace3>)

Writes several faces in space: MULTIPOLYGON Z (((...)), ((...))).

Write(IEnumerable<GeoLine2>)

Writes segments: MULTILINESTRING ((...), (...)).

Write(IEnumerable<GeoLine3>)

Writes segments in space: MULTILINESTRING Z ((...), (...)).

Write(IEnumerable<GeoPoint2>)

Writes points: MULTIPOINT ((x y), (x y)).

Write(IEnumerable<GeoPoint3>)

Writes points in space: MULTIPOINT Z ((x y z), (x y z)).

Write(IEnumerable<GeoPolyline2>)

Writes chains: MULTILINESTRING ((...), (...)).

Write(IEnumerable<GeoPolyline3>)

Writes chains in space: MULTILINESTRING Z ((...), (...)).