「Gis:layer-has-attribute」の版間の差分

提供:GizmoLabs - だいたい CAD LISP なサイト
(ページの作成:「{{BCAD_LISP_GIS}} ; 構文 : (gis:layer-has-attribute ''layerId'' ''name'' ) ; 機能 : name で指定した 'GIS 属性' が layerId で指定した 'GIS レイヤ' オブジェクトに含まれるかどうかを返す。 ; 引数 :* layerId: Feature属性をチェックする「GISレイヤ」の「ハンドル」識別子。 :* name: 検証されるフィーチャー属性の名前 ; 戻り値 : 成功なら文字列、それ以外は nil。 空の…」)
 
編集の要約なし
 
16行目: 16行目:
; 戻り値
; 戻り値
: 成功なら文字列、それ以外は nil。 空の文字列も有効な結果である。
: 成功なら文字列、それ以外は nil。 空の文字列も有効な結果である。
====メモ====
* 「GIS フィーチャー属性」はGISデータベーステーブルの「列」を表す。
* dwgエンティティから構築された 各'GISフィーチャ'は、そのようなテーブルの行である。
* 「GIS フィーチャー属性」の名前は常に大文字と小文字を区別しない!




29行目: 35行目:
1736904439915
1736904439915


(setq source (gis:layer-get-source layerId))
(setq attributes (gis:layer-get-attributes layerId))
""
("id" "name" "int_number" "dec_number" "date")
 
(gis:layer-has-attribute layerId "id")
T
 
(gis:layer-has-attribute layerId "NewId")
NIL
</pre>
</pre>



2025年4月17日 (木) 07:33時点における最新版

構文
(gis:layer-has-attribute layerId name )


機能
name で指定した 'GIS 属性' が layerId で指定した 'GIS レイヤ' オブジェクトに含まれるかどうかを返す。


引数
  • layerId: Feature属性をチェックする「GISレイヤ」の「ハンドル」識別子。
  • name: 検証されるフィーチャー属性の名前


戻り値
成功なら文字列、それ以外は nil。 空の文字列も有効な結果である。


メモ

  • 「GIS フィーチャー属性」はGISデータベーステーブルの「列」を表す。
  • dwgエンティティから構築された 各'GISフィーチャ'は、そのようなテーブルの行である。
  • 「GIS フィーチャー属性」の名前は常に大文字と小文字を区別しない!


サンプル
(vl-load-gis)
T

(setq layers (gis:get-layers))
("shp_3857_point_2d_utf8")

(setq layerId (gis:get-layer (car layers)))
1736904439915

(setq attributes (gis:layer-get-attributes layerId))
("id" "name" "int_number" "dec_number" "date")

(gis:layer-has-attribute layerId "id")
T

(gis:layer-has-attribute layerId "NewId")
NIL



関連事項