final class pointObj (View source)

Properties

float $x
float $y
float $z

used for 3d shape files. set to 0 for other types

float $m

used only for measured shape files - set to 0 for other types

Methods

__construct()

No description

ms_newPointObj()

Old style constructor

float
distanceToLine(pointObj $p1, pointObj $p2)

Calculates distance between a point ad a lined defined by the two points passed in argument.

float
distanceToPoint(pointObj $poPoint)

Calculates distance between two points.

float
distanceToShape(shapeObj $shape)

Calculates the minimum distance between a point and a shape.

int
draw(mapObj $map, layerObj $layer, imageObj $img, int $class_index, string $text)

Draws the individual point using layer. The class_index is used to classify the point based on the classes defined for the layer.

int
project(projectionObj $in, projectionObj $out)

Project the point from "in" projection (1st argument) to "out" projection (2nd argument). Returns MS_SUCCESS/MS_FAILURE.

int
setXY(float $x, float $y, float $m)

Set X,Y coordinate values.

int
setXYZ(float $x, float $y, float $z, float $m)

Set X,Y,Z coordinate values.

Details

final __construct()

No description

final pointObj ms_newPointObj()

Old style constructor

Return Value

pointObj

final float distanceToLine(pointObj $p1, pointObj $p2)

Calculates distance between a point ad a lined defined by the two points passed in argument.

Parameters

pointObj $p1
pointObj $p2

Return Value

float

final float distanceToPoint(pointObj $poPoint)

Calculates distance between two points.

Parameters

pointObj $poPoint

Return Value

float

final float distanceToShape(shapeObj $shape)

Calculates the minimum distance between a point and a shape.

Parameters

shapeObj $shape

Return Value

float

final int draw(mapObj $map, layerObj $layer, imageObj $img, int $class_index, string $text)

Draws the individual point using layer. The class_index is used to classify the point based on the classes defined for the layer.

The text string is used to annotate the point. (Optional) Returns MS_SUCCESS/MS_FAILURE.

Parameters

mapObj $map
layerObj $layer
imageObj $img
int $class_index
string $text

Return Value

int

final int project(projectionObj $in, projectionObj $out)

Project the point from "in" projection (1st argument) to "out" projection (2nd argument). Returns MS_SUCCESS/MS_FAILURE.

Parameters

projectionObj $in
projectionObj $out

Return Value

int

final int setXY(float $x, float $y, float $m)

Set X,Y coordinate values.

.. note:: the 3rd parameter m is used for measured shape files only. It is not mandatory.

Parameters

float $x
float $y
float $m

Return Value

int

final int setXYZ(float $x, float $y, float $z, float $m)

Set X,Y,Z coordinate values.

.. note:: the 4th parameter m is used for measured shape files only. It is not mandatory.

Parameters

float $x
float $y
float $z
float $m

Return Value

int