Show / Hide Table of Contents

    Class Point

    A Point is a 0-dimensional geometry and represents a single location in 2D coordinate space. A Point has a x coordinate value and a y-coordinate value. The boundary of a Point is the empty set.

    Inheritance
    System.Object
    Geometry
    Point
    Implements
    IGeometry
    System.IEquatable<Geometry>
    System.IComparable<Point>
    Inherited Members
    Geometry.Envelope
    Geometry.GetBoundingBox()
    Geometry.AsText()
    Geometry.AsBinary()
    Geometry.ToString()
    Geometry.GeomFromText(String)
    Geometry.GeomFromWKB(Byte[])
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Mapsui.Geometries
    Assembly: Mapsui.Geometries.dll
    Syntax
    public class Point : Geometry, IGeometry, IEquatable<Geometry>, IComparable<Point>

    Constructors

    | Improve this Doc View Source

    Point()

    Initializes a new empty Point

    Declaration
    public Point()
    | Improve this Doc View Source

    Point(Double, Double)

    Initializes a new Point

    Declaration
    public Point(double x, double y)
    Parameters
    Type Name Description
    System.Double x

    X coordinate

    System.Double y

    Y coordinate

    | Improve this Doc View Source

    Point(Double[])

    Create a new point by a douuble[] array

    Declaration
    public Point(double[] point)
    Parameters
    Type Name Description
    System.Double[] point

    Properties

    | Improve this Doc View Source

    BoundingBox

    The minimum bounding box for this Geometry.

    Declaration
    public override BoundingBox BoundingBox { get; }
    Property Value
    Type Description
    BoundingBox
    Overrides
    Geometry.BoundingBox
    | Improve this Doc View Source

    Item[UInt32]

    Returns part of coordinate. Index 0 = X, Index 1 = Y

    Declaration
    public virtual double this[uint index] { get; set; }
    Parameters
    Type Name Description
    System.UInt32 index
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    NumOrdinates

    Returns the number of ordinates for this point

    Declaration
    public virtual int NumOrdinates { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    SetIsEmpty

    Sets whether this object is empty

    Declaration
    protected bool SetIsEmpty { set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    X

    Gets or sets the X coordinate of the point

    Declaration
    public double X { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    Y

    Gets or sets the Y coordinate of the point

    Declaration
    public double Y { get; set; }
    Property Value
    Type Description
    System.Double

    Methods

    | Improve this Doc View Source

    AsPoint()

    Returns a 2D Point instance from this

    Declaration
    public Point AsPoint()
    Returns
    Type Description
    Point Point
    | Improve this Doc View Source

    Clone()

    This method must be overridden using 'public new [derived_data_type] Clone()'

    Declaration
    public Point Clone()
    Returns
    Type Description
    Point

    Clone

    | Improve this Doc View Source

    CompareTo(Point)

    Comparator used for ordering point first by ascending X, then by ascending Y.

    Declaration
    public virtual int CompareTo(Point other)
    Parameters
    Type Name Description
    Point other
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    Contains(Point)

    Declaration
    public override bool Contains(Point point)
    Parameters
    Type Name Description
    Point point
    Returns
    Type Description
    System.Boolean
    Overrides
    Geometry.Contains(Point)
    | Improve this Doc View Source

    Distance(BoundingBox)

    Returns the distance between this point and a BoundingBox

    Declaration
    public double Distance(BoundingBox box)
    Parameters
    Type Name Description
    BoundingBox box
    Returns
    Type Description
    System.Double
    | Improve this Doc View Source

    Distance(Point)

    Returns the distance between this geometry instance and another geometry, as measured in the spatial reference system of this instance.

    Declaration
    public override double Distance(Point point)
    Parameters
    Type Name Description
    Point point
    Returns
    Type Description
    System.Double
    Overrides
    Geometry.Distance(Point)
    | Improve this Doc View Source

    Equals(Geometry)

    Declaration
    public override bool Equals(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom
    Returns
    Type Description
    System.Boolean
    Overrides
    Geometry.Equals(Geometry)
    | Improve this Doc View Source

    Equals(Point)

    Checks whether this instance is spatially equal to the Point 'o'

    Declaration
    public virtual bool Equals(Point p)
    Parameters
    Type Name Description
    Point p

    Point to compare to

    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    FromDMS(Double, Double, Double, Double, Double, Double)

    Returns a point based on degrees, minutes and seconds notation. For western or southern coordinates, add minus '-' in front of all longitude and/or latitude values

    Declaration
    public static Point FromDMS(double longDegrees, double longMinutes, double longSeconds, double latDegrees, double latMinutes, double latSeconds)
    Parameters
    Type Name Description
    System.Double longDegrees

    Longitude degrees

    System.Double longMinutes

    Longitude minutes

    System.Double longSeconds

    Longitude seconds

    System.Double latDegrees

    Latitude degrees

    System.Double latMinutes

    Latitude minutes

    System.Double latSeconds

    Latitude seconds

    Returns
    Type Description
    Point

    Point

    | Improve this Doc View Source

    GetHashCode()

    Serves as a hash function for a particular type. GetHashCode() is suitable for use in hashing algorithms and data structures like a hash table.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for the current GetHashCode().

    Overrides
    Geometry.GetHashCode()
    | Improve this Doc View Source

    IsEmpty()

    If true, then this Geometry represents the empty point set, Ø, for the coordinate space.

    Declaration
    public override bool IsEmpty()
    Returns
    Type Description
    System.Boolean

    Returns 'true' if this Geometry is the empty geometry

    Overrides
    Geometry.IsEmpty()
    | Improve this Doc View Source

    Offset(Double, Double)

    Calculates a new point by translating this point by the specified offset

    Declaration
    public Point Offset(double offsetX, double offsetY)
    Parameters
    Type Name Description
    System.Double offsetX

    Offset to translate in X axis

    System.Double offsetY

    Offset to translate in Y axis

    Returns
    Type Description
    Point

    Returns the offset point

    | Improve this Doc View Source

    Rotate(Double, Point)

    Calculates a new point by rotating this point clockwise about the specified center point

    Declaration
    public Point Rotate(double degrees, Point center)
    Parameters
    Type Name Description
    System.Double degrees

    Angle to rotate clockwise (degrees)

    Point center

    Point about which to rotate

    Returns
    Type Description
    Point

    Returns the rotated point

    | Improve this Doc View Source

    Rotate(Double, Double, Double)

    Calculates a new point by rotating this point clockwise about the specified center point

    Declaration
    public Point Rotate(double degrees, double centerX, double centerY)
    Parameters
    Type Name Description
    System.Double degrees

    Angle to rotate clockwise (degrees)

    System.Double centerX

    X coordinate of point about which to rotate

    System.Double centerY

    Y coordinate of point about which to rotate

    Returns
    Type Description
    Point

    Returns the rotated point

    | Improve this Doc View Source

    ToDoubleArray()

    exports a point into a 2-dimensional double array

    Declaration
    public double[] ToDoubleArray()
    Returns
    Type Description
    System.Double[]

    Operators

    | Improve this Doc View Source

    Addition(Point, Point)

    Vector + Vector

    Declaration
    public static Point operator +(Point v1, Point v2)
    Parameters
    Type Name Description
    Point v1

    Vector

    Point v2

    Vector

    Returns
    Type Description
    Point
    | Improve this Doc View Source

    Multiply(Point, Double)

    Vector * Scalar

    Declaration
    public static Point operator *(Point m, double d)
    Parameters
    Type Name Description
    Point m

    Vector

    System.Double d

    Scalar (double)

    Returns
    Type Description
    Point
    | Improve this Doc View Source

    Subtraction(Point, Point)

    Vector - Vector

    Declaration
    public static Point operator -(Point v1, Point v2)
    Parameters
    Type Name Description
    Point v1

    Vector

    Point v2

    Vector

    Returns
    Type Description
    Point

    Cross product

    Implements

    IGeometry
    System.IEquatable<T>
    System.IComparable<T>

    Extension Methods

    PointExtensions.ToSkia(Point)
    GeometryExtensions.Copy(IGeometry)
    GeometryIterator.AllVertices(IGeometry)
    PointExtensions.ApplyScale(Point, Double)
    PointExtensions.ToDeviceIndependentUnits(Point, Single)
    PositionExtensions.ToForms(Point)
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX