User Tools

Site Tools


api:dk11:java:tatukgis.jdk.tgis_shape.copyfields_tgis_shape

Table of Contents

TGIS_Shape.CopyFields method

DK for Java | tatukgis.jdk.TGIS_Shape.CopyFields | Constructors | Fields | Methods | Properties

Copies field schema (names, types, constraints) from another shape. Does not copy attribute values. Useful for schema synchronization.

Available also on: Delphi | .NET | ActiveX | Python.

Syntax

// Java
public void CopyFields(
  TGIS_Shape _shape
);
// Oxygene
public
  procedure CopyFields(
    _shape : TGIS_Shape
  );

Parameters

Name Type Description
_shape TGIS_Shape Source shape with field schema to copy.

Remarks

PURPOSE:Synchronize field structure (schema replication). When creating new shape, copy source schema for matching attribute structure. Complements CopyGeometry (geometry + CopyFields = full clone).

BEHAVIOR:Copies all field definitions (name, type, width, decimal, rules). Creates equivalent fields in this shape. Attribute values NOT copied (fields empty). Handles field naming collisions intelligently.

USAGE:Clone with fields:shape1.CopyGeometry(source); shape1.CopyFields(source); { geometry + schema, not values }Bulk initialization:for i := 1 to count do begin shape := layer.CreateShape(...); shape.CopyFields(template); { all have same schema } end;

CONSTRAINTS:Copies schema only (not values). Use SetField/GetField manually for value transfer. Field naming conflicts resolved automatically. Complements CopyGeometry (they work independently).

2026/06/13 00:35

Page Tools