SGCoord2D Constructor

Initializes a new instance of the SGPCoord2D class.

SGCoord2D(x, y);

SGCoord2D(coord);

SGCoord2D(arr);

SGCoord2D(strStream);

 

Parameter

Description

x

The x coordinate. Usually longitude

y

The y coordinate. Usually latitude

coord

Construct SGCoord2D object from another coordinate

Can be  SGCoord2D, SGCoord3D or SGPosition

arr

An array of coordinates objects or SGNode objects

strStream

Construct SGCoord2D object from a string. The string can have one of the following formats:

  1. “SGCoord2D(x,y)”
    e.g., “SGCoord2D(100.0,30.0)”

  2. “<SGCoord2D ><x>x</x><y>y</y></SGCoord2D>”
    e.g.,
    “<SGCoord2D >
               <x>100.0</x>
               <y>30.0</y>
            </SGCoord2D>”