Search Results for

    Show / Hide Table of Contents

    Struct GeoPoint

    Represents a point geometry.

    Implements
    IEquatable<GeoPoint>
    Namespace: Realms
    Assembly: Realm.dll
    Syntax
    public readonly struct GeoPoint : IEquatable<GeoPoint>
    Remarks

    This type cannot be used for persistence - i.e. you can't declare a Realm property that is of type GeoPoint. It is only used as a building block for the geospatial shape types, such as GeoBox, GeoCircle, and GeoPolygon.

    Constructors

    | Edit this page View Source

    GeoPoint(double, double)

    Initializes a new instance of the GeoPoint struct with the provided coordinates.

    Declaration
    public GeoPoint(double latitude, double longitude)
    Parameters
    Type Name Description
    double latitude

    The latitude of the point.

    double longitude

    The longitude of the point.

    Properties

    | Edit this page View Source

    Latitude

    Gets the latitude of the point.

    Declaration
    public double Latitude { get; }
    Property Value
    Type Description
    double

    The point's latitude.

    | Edit this page View Source

    Longitude

    Gets the longitude of the point.

    Declaration
    public double Longitude { get; }
    Property Value
    Type Description
    double

    The point's longitude.

    Methods

    | Edit this page View Source

    Equals(GeoPoint)

    Indicates whether the current GeoPoint is equal to another GeoPoint.

    Declaration
    public bool Equals(GeoPoint other)
    Parameters
    Type Name Description
    GeoPoint other

    An object to compare with this GeoPoint.

    Returns
    Type Description
    bool

    trueif the current point's latitude and longitude are equal to the other point's latitude and longitude; otherwise, false.

    | Edit this page View Source

    ToString()

    Returns a string representation of the value.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of the value.

    Overrides
    ValueType.ToString()

    Operators

    | Edit this page View Source

    operator ==(GeoPoint, GeoPoint)

    Compares two GeoPoint instances for equality.

    Declaration
    public static bool operator ==(GeoPoint left, GeoPoint right)
    Parameters
    Type Name Description
    GeoPoint left

    The first GeoPoint.

    GeoPoint right

    The second GeoPoint.

    Returns
    Type Description
    bool

    true if both points contain the same latitude and longitude; false otherwise.

    | Edit this page View Source

    implicit operator GeoPoint((double Latitude, double Longitude))

    Converts a tuple containing latitude and longitude to GeoPoint.

    Declaration
    public static implicit operator GeoPoint((double Latitude, double Longitude) tuple)
    Parameters
    Type Name Description
    (double Latitude, double Longitude) tuple

    The tuple consisting of two coordinates.

    Returns
    Type Description
    GeoPoint

    A GeoPoint with latitude equal to the first element of the tuple and longitude equal to the second element.

    | Edit this page View Source

    operator !=(GeoPoint, GeoPoint)

    Compares two GeoPoint instances for inequality.

    Declaration
    public static bool operator !=(GeoPoint left, GeoPoint right)
    Parameters
    Type Name Description
    GeoPoint left

    The first GeoPoint.

    GeoPoint right

    The second GeoPoint.

    Returns
    Type Description
    bool

    true if the points contain different latitude and longitude; false otherwise.

    Implements

    IEquatable<T>
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2020-2024 Realm
    Generated by DocFX