Search Results for

    Show / Hide Table of Contents

    Class CommonBitsRemover

    Removes common most-significant mantissa bits from one or more Geometrys.

    The CommonBitsRemover "scavenges" precision which is "wasted" by a large displacement of the geometry from the origin. For example, if a small geometry is displaced from the origin by a large distance, the displacement increases the significant figures in the coordinates, but does not affect the relative topology of the geometry. Thus the geometry can be translated back to the origin without affecting its topology. In order to compute the translation without affecting the full precision of the coordinate values, the translation is performed at the bit level by removing the common leading mantissa bits.

    If the geometry envelope already contains the origin, the translation procedure cannot be applied. In this case, the common bits value is computed as zero.

    If the geometry crosses the Y axis but not the X axis (and mutatis mutandum), the common bits for Y are zero, but the common bits for X are non-zero.
    Inheritance
    object
    CommonBitsRemover
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Precision
    Assembly: NetTopologySuite.dll
    Syntax
    public class CommonBitsRemover

    Properties

    | Edit this page View Source

    CommonCoordinate

    The common bits of the Coordinates in the supplied Geometries.

    Declaration
    public Coordinate CommonCoordinate { get; }
    Property Value
    Type Description
    Coordinate

    Methods

    | Edit this page View Source

    Add(Geometry)

    Add a point to the set of geometries whose common bits are being computed. After this method has executed the common coordinate reflects the common bits of all added geometries.

    Declaration
    public void Add(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    A Geometry to test for common bits.

    | Edit this page View Source

    AddCommonBits(Geometry)

    Adds the common coordinate bits back into a Geometry. The coordinates of the Geometry are changed.

    Declaration
    public void AddCommonBits(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The Geometry to which to add the common coordinate bits.

    | Edit this page View Source

    RemoveCommonBits(Geometry)

    Removes the common coordinate bits from a Geometry. The coordinates of the Geometry are changed.

    Declaration
    public Geometry RemoveCommonBits(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The Geometry from which to remove the common coordinate bits.

    Returns
    Type Description
    Geometry

    The shifted Geometry.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX