Table of Contents

Method ToCoordinateSystem

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

ToCoordinateSystem(GeoCoordinateSystem3)

Creates the transformation that takes world coordinates into the local coordinates of a coordinate system, the reverse of FromCoordinateSystem(GeoCoordinateSystem3).

public static GeoTransform3 ToCoordinateSystem(GeoCoordinateSystem3 system)

Parameters

system GeoCoordinateSystem3

Returns

GeoTransform3

Remarks

It does for a whole shape what ToLocal(GeoPoint3) does for a point: take the shape into the frame through TransformBy, work on it in local coordinates, and put the result back with FromCoordinateSystem(GeoCoordinateSystem3). A frame given in the local coordinates of another nests by multiplying, the outer one read into first: ToCoordinateSystem(inner) * ToCoordinateSystem(outer).

A coordinate system is rigid, so nothing is inverted: its axes become the rows as they stand, and only the translation, the origin read along each axis, is worked out. Inverting the placement with Inverse() reaches the same matrix the long way, through cofactors and a division by the determinant.