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

提供:GizmoLabs - だいたい CAD LISP なサイト
(ページの作成:「{{BCAD_LISP_GIS}} ; 構文 : (gis:layer-remove-attributes ''layerId'' ''name'') ; 機能 : layerId で指定された 'GIS レイヤー' オブジェクトから name で指定された 'GIS 属性' を削除する。 ; 引数 :* layerId: GISレイヤーの属性を問い合わせるための'ハンドル'識別子の整数 :* name: 削除する属性名の文字列 ; 戻り値 : 成功ならT、それ以外は nil ===メモ=== * 「GIS フィーチャ…」)
 
編集の要約なし
 
11行目: 11行目:
; 引数
; 引数
:* layerId: GISレイヤーの属性を問い合わせるための'ハンドル'識別子の整数
:* layerId: GISレイヤーの属性を問い合わせるための'ハンドル'識別子の整数
:* name: 削除する属性名の文字列
:* name: 削除するGIS 属性名の文字列。 (大文字小文字は区別しない)





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

構文
(gis:layer-remove-attributes layerId name)


機能
layerId で指定された 'GIS レイヤー' オブジェクトから name で指定された 'GIS 属性' を削除する。


引数
  • layerId: GISレイヤーの属性を問い合わせるための'ハンドル'識別子の整数
  • name: 削除するGIS 属性名の文字列。 (大文字小文字は区別しない)


戻り値
成功ならT、それ以外は 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 name))
1736947670764

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

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

(gis:layer-add-attribute layerId (list "NewId" 3 "---empty---"))
T

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

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

(gis:layer-remove-attribute layerId "newid")
T

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



関連事項