Options
All
• Public
• Public/Protected
• All

# Class Point

Represents a point in 3 (x,y,z) dimensions. A Point cannot be instantiated directly, instead use the createPoint method from the ShapeFactory module. A point is always defined in the context of a spatial reference. For a geodetic spatial reference, the x and y properties correspond with longitude and latitude on the ellipsoid. For projected spatial references, the x and y properties correspond with the x and y axis in Cartesian space. The z property always corresponds with height.

## Accessors

### coordinateType

• The coordinate type this shape. This property is read only. An Error will be thrown when trying to assign to this property.

### focusPoint

• get focusPoint(): Point

### reference

• The spatial reference of this shape. This property is read only. An Error will be thrown when trying to assign to this property.

### type

• The type of the Shape. This is a member of the ShapeType enumeration.

### x

• get x(): number
• set x(value: number): void
• The x coordinate of the Point. For a point that is defined in a geodetic spatial reference this property returns the longitude. Assigning to the x property of a point with a geodetic spatial reference will normalize the coordinate to the interval [-180, 180]. E.g. if you assign a value or 380 to the x property, it will be normalized to 20;

#### Returns number

• The x coordinate of the Point. For a point that is defined in a geodetic spatial reference this property returns the longitude. Assigning to the x property of a point with a geodetic spatial reference will normalize the coordinate to the interval [-180, 180]. E.g. if you assign a value or 380 to the x property, it will be normalized to 20;

### y

• get y(): number
• set y(value: number): void
• The y coordinate of the Point. For a point that is defined in a geodetic spatial reference this property returns the latitude. Assigning to the y property of a point with a geodetic spatial reference will normalize the coordinate to the interval [-90, 90]. E.g. if you assign a value of 100 to the y property, it will be normalized to 90;

#### Returns number

• The y coordinate of the Point. For a point that is defined in a geodetic spatial reference this property returns the latitude. Assigning to the y property of a point with a geodetic spatial reference will normalize the coordinate to the interval [-90, 90]. E.g. if you assign a value of 100 to the y property, it will be normalized to 90;

### z

• get z(): number
• set z(value: number): void
• The z coordinate of the Point. The z coordinate typically corresponds with height.

#### Returns number

• The z coordinate of the Point. The z coordinate typically corresponds with height.

## Methods

### contains2D

• Determines whether a given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

throws

InvalidReferenceError when passing a Point with another spatial reference

deprecated

#### Parameters

• ##### x: Point | number | Bounds

The point for which containment must be checked. If a 3D point is passed to this function, it will be treated as a 2D point: the z coordinate (height) will be ignored. The reference of this point must be the same reference as this Shape

#### Returns boolean

`true` when the given point is contained in this shape

### Abstract contains2DCoordinates

• (x: number, y: number): boolean
• Determines whether the given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

throws

InvalidReferenceError when passing a Point with another spatial reference

#### Parameters

• ##### x: number

The x coordinate of the point for which containment must be checked

• ##### y: number

The y coordinate of the point for which containment must be checked

#### Returns boolean

`true` when the given point is contained in this shape

### contains2DPoint

• (point: Point): boolean
• Determines whether the given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

throws

InvalidReferenceError when passing a Point with another spatial reference

#### Parameters

• ##### point: Point

The point for which containment must be checked.

#### Returns boolean

`true` when the given point is contained in this shape

### Abstract equals

• (otherShape: Shape): boolean
• Indicates whether this shape is equal to another.

#### Parameters

• ##### otherShape: Shape

the other shape this shape is compared with.

#### Returns boolean

`true` if both shapes are equal, `false` otherwise.

### move2D

• (xOrPoint: number | Point, y?: number): void
• Moves this Point to another location. The passed x and y will become the x and y coordinates of this point. The z coordinate of this Point remains unmodified.

#### Parameters

• ##### xOrPoint: number | Point

x coordinate value or a Point instance

• ##### Optional y: number

y coordinate value

### Abstract move2DToCoordinates

• (x: number, y: number): void
• Moves this Point to another location. The passed x and y will become the x and y coordinates of this point. The z coordinate of this Point remains unmodified.

#### Parameters

• ##### x: number

x coordinate value

• ##### y: number

y coordinate value

### move2DToPoint

• Moves this Point to another location. This Point will be moved to the same location of the Point that was passed. The z coordinate of the point that was passed will be ignored.

throws

InvalidReferenceError when the reference of the Point parameter does not correspond with the reference of this Point.

#### Parameters

• ##### point: Point

a Point instance

### move3D

• (xOrPoint: Point | number, y?: number, z?: number): void
• Moves this Point to another location. The passed x,y and z coordinates will become the x, y and z coordinates of this point.

#### Parameters

• ##### xOrPoint: Point | number

x coordinate value or a Point instance.

• ##### Optional y: number

y coordinate value

• ##### Optional z: number

z coordinate value

### Abstract move3DToCoordinates

• (x: number, y: number, z: number): void
• Moves this Point to the given x, y and z coordinates.

#### Parameters

• ##### x: number

x coordinate value

• ##### y: number

y coordinate value

• ##### z: number

z coordinate value

### move3DToPoint

• Moves this point to the same location of the given Point.

throws

InvalidReferenceError when the reference of the Point parameter does not correspond with the reference of this Point.

#### Parameters

• ##### point: Point

a Point instance

### Abstract toString

• (excludeType?: boolean): string

### translate

• (x: number, y: number, z?: number): void
• Translates this Point from its current position over the given translation vector to another location. This method can be called with an x, y and optionally a z value. If the z coordinate is not specified, the translation will only affect the x and y coordinate.

#### Parameters

• ##### x: number

x coordinate value

• ##### y: number

y coordinate value

• ##### Optional z: number

z coordinate value, may be omitted.

### Abstract translate2D

• (x: number, y: number): void
• Translates the shape over the given vector in 2D space.

#### Parameters

• ##### x: number

The x coordinate of the translation vector

• ##### y: number

The y coordinate of the translation vector

### Abstract translate3D

• (x: number, y: number, z: number): void
• Translates this Point from its current position over the given translation vector to another location.

#### Parameters

• ##### x: number

x coordinate value

• ##### y: number

y coordinate value

• ##### z: number

z coordinate value

## Legend

• Module
• Object literal
• Variable
• Function
• Function with type parameter
• Index signature
• Type alias
• Type alias with type parameter
• Enumeration
• Enumeration member
• Property
• Method
• Interface
• Interface with type parameter
• Constructor
• Property
• Method
• Index signature
• Class
• Class with type parameter
• Constructor
• Property
• Method
• Accessor
• Index signature
• Inherited constructor
• Inherited property
• Inherited method
• Inherited accessor
• Protected property
• Protected method
• Protected accessor
• Private property
• Private method
• Private accessor
• Static property
• Static method