+-------+ 1 1..* +------+
| Shape | --------> | Line |
+-------+ +------+
4.26.1 shapeObj 属性
bounds :フィーチャーの空間範囲です。
classindex : int
フィーチャーは所属しているクラスのインデックスです。
index : int
フィーチャーのインデックスです。
numlines : int immutable
含まれたpartsの数です。
numvalues : int immutable
属性項目の数です。
text : string
フィーチャーの文字です。
tileindex : int
フィーチャーは所属しているタイルのインデックスです。
type : int
MS_SHAPE_POINT, MS_SHAPE_LINE, MS_SHAPE_POLYGON或いは MS_SHAPE_NULL。
4.26.2 shapeObj メソッド
new shapeObj( int type ) : shapeObj
typeで指定されたシェープインスタンスを作成します。ディフォルトで、属性値が設定されません。
lineObj line ) : int
add(シェープにライン(すなわち一部分)を追加します。MS_SUCCESS或いはMS_FAILUREを返します。
boundary() : shapeObj
図形の境界線を返します。失敗の場合はNULL/undefを返します。
buffer( int distance ) : shapeObj
指定された幅でバッファーリンク図形を作成します。失敗の場合はNULL/undefを返します。
contains( pointObj point ) : int
シェープにpointが含まれていたらMS_TRUEが、そうでなければMS_FALSEが返ります。
contains( shapeObj shape2 ) : int
shape2は完全に図形の範囲内含まれる場合はtrueを返します。
convexHull() : shapeObj
凸包ポリゴンを作成します。失敗の場合はNULL/undefを返します。
copy( shapeObj shape_copy ) : int
shape_copyにシェープをコピーします。MS_SUCCESS或いはMS_FAILUREを返します。
clone() : shapeObj
シェープの独立のコピーを返します。
crosses( shapeObj shape2 ) : int
交差部分がある場合ははtrueを返します。
difference( shapeObj shape ) : shapeObj
違い部分の図形を返します。
disjoint( shapeObj shape2 ) : int
Returns MS_TRUE if shape2 and the shape are disjoint. Returns -1 on error and MS_FALSE otherwise.
distanceToPoint( pointObj point ) : float
指定されたpointまでの距離を返します。
distanceToShape( shapeObj shape ) : float
指定されたshapeまでの距離を返します。
draw( mapObj map, layerObj layer, imageObj img ) : int
レイヤを使って個別のシェープを描きます。MS_SUCCESSまたはMS_FAILUREが返ります。
equals( shapeObj shape2 ) : int
同じ図形の場合はMS_TRUEを返します。
fromWKT( char \*wkt ) : shapeObj
WKT文字列からShapeObj作成します。
get( int index ) : lineObj
インデックスを与えて、シェープのライン(part)を取得します。
getArea() : double
図形の面積を返します。
getCentroid() : pointObj
図形の重心を返します。
getLength() : double
図形の長さを返します。
getValue( int i ) : string
属性項目インデックスを与えて、該当属性を返します。
initValues( int numvalues ) : void
Allocates memory for the requested number of values.
intersects( shapeObj shape ) : int
2つのシェープが交差していたらMS_TRUEが、そうでなければMS_FALSEが返ります
intersection( shapeObj shape ) : shapeObj
交差部分の図形を返します。
overlaps( shapeObj shape2 ) : int
共通部分がある場合は、trueを返します。
project( projectionObj proj_in, projectionObj proj_out ) : int
シェープを ”in” 投影(第1引数)から”out” 投影(第2引数)へ投影します。MS_SUCCESSまたはMS_FAILUREが返ります。
setBounds : void
partsをシェープに追加した後、空間範囲を再計算します。
setValue( int i, string value ) : int
属性の値を設定します。
symDifference( shapeObj shape ) : shapeObj
Returns the computed intersection of the supplied and existing shape.
touches( shapeObj shape2 ) : int
Returns MS_TRUE if the shape and shape2 touch. Returns -1 on error and MS_FALSE otherwise.
toWKT() : string
図形をWkt文字列を返します。
Union( shapeObj shape ) : shapeObj
この図形をパラメータで渡した図形と合併して新図形を返します。
within( shapeObj shape2 ) : int
shape2は完全に図形の範囲内含まれる場合はtrueを返します。