DK for Delphi | GisLayerVector.TGIS_Shape.Distance | Constructors | Fields | Methods | Properties
Calculate planar distance between a point and the shape.
// Delphi public function Distance( const _ptg : TGIS_Point; const _prec : Double ) : Double; virtual;
// C++ Builder public: virtual double Distance( TGIS_Point* const _ptg, const double _prec );
Name | Type | Description |
---|---|---|
_ptg | TGIS_Point | reference point |
_prec | Double | precision /not longer distance than/; point inside the polygon is always not greater then _prec; if _prec less than 0, then being outside/inside polygon means the same; |
Type | Description |
---|---|
Double | Distance between shapes in map units. |
var _shape : TGIS_Shape; x : Double; pkt : TGIS_Point; pkt.X:=10; pkt.Y:=10; // calculate a distance x:=_shape.Distance(pkt,20);