Click or drag to resize

Location Structure

Represents an x- and y-coordinate pair with an optional z-coordinate.

Namespace:  Ptv.Components.Projections
Assembly:  Ptv.Components.Projections (in Ptv.Components.Projections.dll) Version: 1.7.10.0
Syntax
public struct Location

The Location type exposes the following members.

Constructors
  NameDescription
Public methodLocation(Point)
Initializes a new instance of the Location struct, including its x- and y-coordinate from the given point.
Public methodLocation(Location)
Initializes a new instance of the Location struct, initializing its coordinates from the given location.
Public methodLocation(Double, Double, NullableDouble)
Initializes a new instance of the Location struct, initializing it with the given coordinates.
Top
Methods
  NameDescription
Public methodToString
Returns a string representing of the current location.
(Overrides ValueTypeToString.)
Public methodCode exampleTransform
Provides a shortcut for transforming the current location from one coordinate reference system to another.
Top
Fields
  NameDescription
Public fieldX
The x-coordinate of the location.
Public fieldY
The y-coordinate of the location.
Public fieldZ
The optional z-coordinate of the location.
Top
Extension Methods
  NameDescription
Public Extension MethodToJson
Converts an object to a JSON string representation.
(Defined by JSONWriter.)
Top
Remarks
The struct uses double precision coordinates and has been introduced to handle special coordinate transformations where a z-coordinate is mandatory. For the sake of differentiation the struct has been named Location, as several other point structs and classes exist ( System.Windows.Point, System.Drawing.Point, System.Drawing.PointF and others). In most cases it is not necessary to work with Location at all, as the basic transformation routines provided through ICoordinateTransformation are designed to work with System.Windows.Point as well.
See Also