User Tools

Site Tools


api:dk11:delphi:gislayervector.tgis_shape



TGIS_Shape class

DK for Delphi | GisLayerVector.TGIS_Shape | Classes | Constructors | Fields | Methods | Properties

Generic shape class. This class keeps all functionality of a shape.

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

Syntax

// Delphi
type
  TGIS_Shape = class( TGIS_ShapeAbstract )
  end;
// C++ Builder
class PASCALIMPLEMENTATION TGIS_Shape : public TGIS_ShapeAbstract
{
};

Inheritance

Constructors

Inherited Overrides Protected
Name Visibility Description
Create public Create a shape instance.
Create(TGIS_DimensionType) public Create a shape instance.
Create(TGIS_Shape; Pointer; Boolean; TGIS_Uid; TGIS_LayerVector) public Create a 2D shape instance.
Create(TGIS_Shape; Pointer; Boolean; TGIS_Uid; TGIS_LayerVector; TGIS_DimensionType) public Create a 2D shape instance.
Destroy public Destroy a shape instance.

Fields

Inherited Protected
Name Visibility Description
FDimension protected Dimensions supported by a shape.
FGeometryChanged protected Has shape geometry changed.
FIsDeleted protected True if the Shape needs to be deleted.
FIsEditable protected Is shape editable.
FIsFixed protected True if the Shape has checked and fixed winding.
FIsHidden protected Is shape hidden.
FIsMapped protected True if geometry not allocated but mapped to a file.
FIsModified protected Is shape (geometry or fields) modified.
FIsNewShape protected Is shape a independent object or is a mirror of disk based shape.
FIsReverted protected True if the Shape needs to be reverted to version saved in file.
FParts protected Internal storage of parts.
FPartTypes protected Internal storage of part types.
FPoints protected Internal storage of points.
FPointsM protected Internal storage of points.
FPointsMMax protected Maximum M value.
FPointsMMin protected Minimum M value.
FPointsZ protected Internal storage of points.
FPointsZMax protected Maximum Z value.
FPointsZMin protected Minimum Z value.
FShapeType protected Object type.
FUid protected Unique identifier across a single layer.
indexDist2PartCS protected Used to limit Distance2PartCS to the neighborhood of a specific point.
mappedFields protected list of fields.
oldIndexExtent protected Get old extent for current shape (before editing).

Methods

Inherited Overrides Protected
Name Visibility Description
AddPart public Start new multi-part geometry segment.
AddPoint public Add 2D point to current shape's last part.
AddPoint3D public Add 3D point to shape's current part with Z elevation coordinate.
AddPointBearing(Double; Double) public Add point to shape based on bearing and distance from last vertex.
AddPointBearing(Double; Double; Boolean) public Add point to shape using compass bearing (North-oriented) and distance.
AddPointBearingCS public Appends point to shape using geodetic bearing and distance in meters.
AddToIndex public Add shape extent to spatial index (R-Tree).
AddToLayer public Clone shape to layer with new UID.
AppendGeometry public Appends geometry from another shape to this shape (multi-part concatenation).
Area public Calculates the planar area enclosed by the shape.
AreaCS public Calculates polygon area using WGS84 geodetic model.
AsArc public Convert shape to TGIS_ShapeArc (LineString).
AsMultiPoint public Convert shape to TGIS_ShapeMultiPoint.
AsPoint public Convert shape to TGIS_ShapePoint.
AsPolygon public Convert shape to TGIS_ShapePolygon.
Assign public Copy all data (geometry and attributes) from source shape.
Centroid public Calculates the geometric centroid (center of mass) of the shape.
ChangeWinding public Reverses vertex winding order of a shape part (clockwise ↔ counter-clockwise).
checkIsEmpty protected Determines whether shape geometry is empty (no points or parts), used for validation and intersection tests.
Combine(TGIS_Shape; TGIS_TopologyCombineType) public Performs boolean geometry operation (union/intersection/difference) combining this shape with another.
Combine(TGIS_Shape; TGIS_TopologyCombineType; Boolean) public Performs boolean geometry operation with control over result ownership (new object vs in-place modification).
Contains public Tests if shape completely contains another shape (DE-9IM topology test).
CopyFields public Copies field schema (names, types, constraints) from another shape.
CopyGeometry public Replaces this shape's geometry with a copy from another shape.
copyInternalFields protected Copy internal mapped fields from one shape to another.
copyInternalParams protected Copy internal Params from one shape to another.
CreateCopy public Creates an independent deep copy of the shape with all geometry, attributes, and styling properties replicated to new instance.
CreateCopyCS public Creates an independent copy of shape reprojected to target coordinate system.
CreateFromEWKB public Parses Extended Well-Known Binary (EWKB) with PostGIS SRID metadata.
CreateFromEWKT public Parses Extended Well-Known Text (EWKT) with PostGIS SRID metadata.
CreateFromGDO public Parses GeoMedia Database Object (GDO) format geometry.
CreateFromGML public Parses Geography Markup Language (GML) XML format (ISO 19136 OGC standard).
CreateFromJSON public Parses GeoJSON standard geometry format (RFC 7946).
CreateFromWKB public Parses Well-Known Binary (WKB) standard binary geometry format from OGC spec.
CreateFromWKT public Parses Well-Known Text (WKT) standard geometry format from OGC spec.
Cross public Tests if two shapes cross (DE-9IM topology test).
Delete public Mark shape for deletion (soft-delete).
Difference(TGIS_Shape) public Computes difference (parts in self but not in other shape).
Difference(TGIS_Shape; Boolean) public Computes difference with ownership control.
Disjoint public Tests if two shapes have no spatial overlap (DE-9IM topology test).
Distance public Calculates planar (2D map-space) distance from point to shape.
Distance2Part public Calculates linear distance from point to nearest element of a shape part, with optional perpendicular projection and precision limits.
Distance2PartCS public Calculate the WGS84 distance between a point and a part in the current shape.
Distance2Shape(TGIS_Shape) public Calculates planar distance between two shapes (minimum distance across all geometry elements).
Distance2Shape(TGIS_Shape; TGIS_Line) public Calculates planar distance between two shapes and returns the shortest connecting line segment.
Distance2ShapeCS public Calculate geodetic distance between two shapes using WGS84 model.
DistanceCS public Calculates geodetic distance from point to shape using WGS84 ellipsoid model.
Draw public Render shape on viewer using default monolithic rendering mode.
Draw(TGIS_RendererMultipassMode) public Render shape on viewer using specified rendering mode.
DrawChart public Render chart/graph associated with shape (if any).
DrawLabel public Renders shape label immediately to viewer.
DrawLabel(TGIS_DrawBuf) public Render shape label and return bounding polygon points.
DrawSpecial public Render shape with default special rendering (monolithic outline mode).
DrawSpecial(TGIS_RendererMultipassMode) public Render shape with special outline mode for line junction cleanup.
DrawTrackingPoints public Render shape editing tracking points (vertices) for UI feedback.
Equality public Tests if two shapes are geometrically equivalent (same geometry, possibly different coordinate order).
ExportToEWKB public Exports shape geometry to EWKB binary format with SRID metadata (PostGIS binary).
ExportToEWKT public Exports shape geometry to EWKT format with SRID metadata (PostGIS text).
ExportToGDO public Exports shape geometry to GDO binary format (Intergraph legacy).
ExportToGML public Exports shape geometry to GML XML format (ISO 19136 OGC standard).
ExportToJSON public Exports shape geometry to GeoJSON format (RFC 7946).
ExportToVAR public Exports shape geometry to internal Variant format (SHP-compatible).
ExportToWKB public Exports shape geometry to WKB standard binary format (OGC).
ExportToWKT public Exports shape geometry to WKT standard text format (OGC).
Flash public Flash shape on screen with default parameters (4 flashes, 100ms delay).
Flash(Integer; Integer) public Flash shape on screen with specified parameters.
GetAngle public Compute cardinal direction angle of shape endpoints.
GetCrossings public Find all points where shape edges intersect/cross another shape's edges.
GetCrossings3D public Find all 3D points where shape edges intersect another shape, including Z coordinates.
GetField public Retrieves field value from current shape's attributes.
GetFieldEx(String) public Retrieves raw field value from current shape attribute (null- preserving variant of GetField).
GetFieldEx(String; Boolean) public Retrieves field value with optional field rule expansion (alias matching, computed values).
GetFieldEx(String; Integer) public Retrieves raw field value from specified cursor position (query result).
GetFieldEx(String; Integer; Boolean) public Retrieves field value from cursor position with optional rule expansion.
GetFirstPoint public Retrieve starting vertex of geometry (first point in first part).
GetFirstPoint3D public Retrieve starting vertex of 3D geometry including elevation.
GetIntersection(TGIS_Extent) public Clip shape geometry to extent bounds with precise normalization.
GetIntersection(TGIS_Extent; Boolean) public Clip shape geometry to extent bounds.
GetLabel public Returns shape label text with expanded field values and HTML markup.
GetLabelPlain public Returns shape label text with expanded field values, HTML markup stripped.
GetLastPoint public Retrieve ending vertex of geometry (last point in last part).
GetLastPoint3D public Retrieve ending vertex of 3D geometry including elevation.
GetNumParts public Number of distinct parts (rings, segments) in shape.
GetNumPoints public Total vertex count across all parts of shape.
getPartOffset protected Calculate a part offset.
GetPartSize public Vertex count within a single part.
GetPartType public Part topology type (exterior ring, interior hole, etc.).
GetPoint public Retrieve 2D point from shape at specified part/vertex index.
GetPoint3D public Retrieve 3D point from shape at specified part/vertex index including elevation.
GetPoint3DEx public Retrieve full 4D point (X, Y, Z, M) via output parameters.
GetPointEx public Retrieve 2D point coordinates (X, Y) from shape via output parameters.
GetSnapPoint public Find nearest snap point on shape geometry to target location.
GetSnapPoint3D public Find nearest snap point on 3D shape geometry including elevation.
ImportFromEWKB public Replaces shape geometry by parsing EWKB binary (in-place import).
ImportFromEWKT public Replaces shape geometry by parsing EWKT text (in-place import).
ImportFromGDO public Replaces shape geometry by parsing GDO binary (in-place import).
ImportFromGML public Replaces shape geometry by parsing GML (in-place import).
ImportFromJSON public Replaces shape geometry by parsing GeoJSON (in-place import).
ImportFromVAR public Replaces shape geometry with Variant array format (internal format import).
ImportFromWKB public Replaces shape geometry by parsing WKB binary (in-place import).
ImportFromWKT public Replaces shape geometry by parsing WKT text (in-place import).
Intersect public Tests if two shapes have any spatial overlap (DE-9IM topology test).
Intersection(TGIS_Shape) public Computes intersection (overlapping area) of this shape and another.
Intersection(TGIS_Shape; Boolean) public Computes intersection with ownership control.
Invalidate public Invalidate cached rendering of shape.
IsCommonPoint public Test if shapes share any common point (overlap or touch).
IsFieldModified public Tests if field value has been modified in current shape.
IsFieldModifiedEx public Tests if field value has been modified using zero-based field index (faster than string-based IsFieldModified).
IsInsideCircle public Test if shape is completely or partially within circular bounds.
IsInsideExtent public Test if shape is completely or partially within axis-aligned rectangular bounds.
IsInsidePolygon public Test if shape is completely or partially within polygon bounds.
Join(TGIS_Shape) public Connect end of current shape to start of another shape.
Join(TGIS_Shape; Boolean) public Connect end of current shape to another, with ownership control.
Length public Calculates planar length of shape.
LengthCS public Calculates geodetic length using WGS84 model.
Lock public Lock shape for bulk edit operations (burst mode).
MakeEditable public Promote shape to editable state (detach from file/database).
Overlap public Tests if shapes overlap (DE-9IM topology test).
ParamsAsDrawn public Retrieves shape styling parameters (colors, symbols, rendering properties) as displayed in current viewer context.
PartLength public Calculates planar length of a single shape part.
PartLengthCS public Calculates geodetic length of a single shape part using WGS84 model.
PointOnShape public Calculates a point guaranteed to lie on the shape boundary.
PrepareContourInternal public Prepare rasterized contour bitmap for polygon topology operations.
PrepareExportShape public Prepare shape for export: reproject to target CRS, optionally truncate by extent, and copy field attributes.
Recreate(TGIS_Shape; Pointer; Boolean; TGIS_Uid; TGIS_LayerVector) public Reinitializes shape instance with new geometry data (memory-mapped or copied), enabling shape object reuse for efficient iteration.
Recreate(TGIS_Shape; Pointer; Boolean; TGIS_Uid; TGIS_LayerVector; TGIS_DimensionType) public Reinitialize existing shape instance with new geometry/layer context.
Relate public Tests spatial relationship using DE-9IM (Dimensionally Extended 9-Intersection Model) topology matrix.
Reset public Clear all geometry (vertices and parts).
ResetModified public Clear IsModified flag (marks shape as unmodified/saved state).
Reverse public Reverse order of parts in multi-part shape.
Reverse(Boolean) public Reverse order of parts with ownership control.
RevertParams public Discard local rendering parameters and revert to layer defaults.
SetField public Sets field value in current editing context.
SetFieldsDefaulRuleValue public Applies field rule defaults to all fields in current shape.
SetParamsInternal public Prepare params.
SetPartType public Set part topology type (exterior ring, interior hole, etc.).
SetPosition public Move shape to specified location with optional snapping to nearest feature in reference layer.
Simplify(Double) public Line generalization routine using Douglas-Peucker vertex elimination.
Simplify(Double; Boolean) public Line generalization with ownership control (new object or in-place modification).
Smooth(Integer) public Spline smoothing routine using Catmull-Rom interpolation.
Smooth(Integer; Boolean) public Spline smoothing with ownership control (new object or in-place).
Split public Decompose multi-part shape into list of single-part shapes.
StrokeArc(TGIS_Point3D; Double; Double; Double; Double; Double) public Adds elliptical arc vertices to shape by interpolating between start and stop angles.
StrokeArc(TGIS_Point3D; Double; Double; Double; Double; Double; Integer) public Adds elliptical arc vertices with control over segment count (resolution).
SymmetricalDifference(TGIS_Shape) public Computes symmetrical difference (parts in either but not both shapes).
SymmetricalDifference(TGIS_Shape; Boolean) public Computes symmetrical difference with ownership control.
Touch public Tests if two shapes touch at boundary only (DE-9IM topology test).
Transform(TGIS_Point3D; Double; Double; Double; Double; Double; Double; Double; Double; Double; Double; Double; Double) public Transforms shape geometry using 3×3 matrix + translation vector.
Transform(TGIS_Point3D; Double; Double; Double; Double; Double; Double; Double; Double; Double; Double; Double; Double; Boolean) public Transforms shape with matrix + translation, ownership control (new object or in-place modification).
Union(TGIS_Shape) public Computes union (combined area) of this shape and another.
Union(TGIS_Shape; Boolean) public Computes union with control over result ownership (new vs in-place).
Unlock public Unlock shape and recompute extents/projections deferred during Lock.
UpdateIndex public Update shape extent in spatial index (R-Tree) after geometry modification.
UpdatePoint public Updates point coordinates at specified position in shape.
UpdatePoint3D public Updates 3D point coordinates (X, Y, Z) at specified position.
Within public Tests if shape is completely inside another shape (DE-9IM topology test).

Properties

Inherited Protected
Name Visibility Description
Dimension public Shape dimensionality: 2D (X/Y), 3D (X/Y/Z), or 4D (X/Y/Z/M).
Extent public Bounding box (extent) of shape geometry in 2D space.
Extent3D public Bounding box (extent) of 3D shape geometry including elevation.
FieldChanged public Shape attribute data has changed since last check.
GeometryChanged public Shape geometry has changed since last check.
GeometrySize public Total size in bytes of entire shape geometry (parts + points + Z + M).
IsDeleted public Shape is marked for deletion.
IsEditable public Shape can be edited (geometry modification allowed).
IsEmpty public Geometry contains no coordinates (no parts/points).
IsFixed public Shape winding has been checked and corrected.
IsHidden public Shape is hidden (visibility toggle).
IsMapped public Geometry is memory-mapped to file (not fully loaded into memory).
IsModified public Shape geometry or attributes have been modified since load/create.
IsNewShape public Shape is a new in-memory object (not loaded from file).
IsReverted public Shape geometry requires revert to saved file version.
IsSelected public Shape is selected in layer.
Layer public Reference to parent layer containing shape.
LocalParams public Shape has private rendering parameters independent of layer.
LockLevel public Lock mode/state for concurrent access control.
ManageRTree public Shape's R-Tree spatial index is framework-managed (auto-maintained).
Params public Shape-specific rendering parameters (colors, fills, symbols).
ParentShape public Parent shape for complex/composite geometries.
Parts public Raw internal storage of shape parts (SHP format compatible).
PartsSize public Size in bytes of raw parts buffer.
PartTypes public Raw internal storage of part types (polygon ring orientation).
PartTypesSize public Size in bytes of raw part types buffer.
Points public Raw internal storage of shape vertices (X, Y coordinates).
PointsM public Raw internal storage of shape vertices including M (measure).
PointsMMax public Maximum M (measure) value across all vertices in measured shape.
PointsMMin public Minimum M (measure) value across all vertices in measured shape.
PointsMSize public Size in bytes of raw M measure buffer.
PointsSize public Size in bytes of raw XY points buffer.
PointsZ public Raw internal storage of shape vertices including Z (elevation).
PointsZMax public Maximum Z elevation value across all vertices in 3D shape.
PointsZMin public Minimum Z elevation value across all vertices in 3D shape.
PointsZSize public Size in bytes of raw Z elevation buffer.
ProjectedExtent public Projected extent (bounds) of shape in viewer's projected coordinate system.
ShapeType public Geometry type of shape (Point, LineString, Polygon, etc.).
SmartSize public Visual size of shape for display purposes.
Tag public Application-specific integer tag for shape context/metadata.
TagInternal public Internal framework tag.
TagPointer public Application-specific pointer tag for shape context/metadata.
Uid public Unique identifier for shape within layer.
Viewer public Reference to viewer context containing shape.

References

2026/06/12 22:43

Page Tools