User Tools

Site Tools


samples:samples:hellodk

Table of Contents

HelloDK sample

Documentation | Samples | HelloDK

Summary

HelloDK - TatukGIS Developer Kernel introductory sample demonstrating core GIS workflows including data loading, layer management, and interactive visualization.

Description

What the sample shows:

  • Opening a vector Shapefile (world map) into the GIS viewer
  • Switching the viewer interaction mode: Zoom / Drag / Select
  • Creating an in-memory editable vector layer with a transparent polygon style
  • Building a polygon shape programmatically by adding explicit vertices
  • Click-to-select a feature using screen-to-map coordinate conversion
  • Spatial proximity search via GIS.Locate to identify shapes near cursor
  • Spatial containment query using DE-9IM topology predicates
  • SQL WHERE filtering to find shapes with specific attributes
  • Full extent zoom and navigation buttons
  • Core TatukGIS DK workflow demonstration

This sample illustrates use of:

Name Description
TGIS_ViewerGeneric map viewer implementation intended to be used through descendants such as TGIS_ViewerWnd and TGIS_ViewerBmp rather than directly.
TGIS_ViewerWndMain FireMonkey visual control for displaying and interacting with maps in a window.
TGIS_Viewer.OpenOpen a project.
TGIS_Viewer.InvalidateWholeMapInvalidate whole map.
TGIS_Viewer.LockLock the viewer.
TGIS_Viewer.UnlockUnlock the viewer and redraw it.
TGIS_Viewer.ScreenToMapConverts point coordinates from screen coordinates to map coordinates.
TGIS_Viewer.LocateLocates the shape nearest to _ptg that is within _prec.
TGIS_Viewer.AddAdd a layer to the Viewer.
TGIS_Viewer.GetRetrieve the layer identified by name.
TGIS_LayerVector.DeselectAllClears the selection state of all shapes in the layer.
TGIS_LayerVector.GetShapeRetrieves a shape by its unique identifier (UID) using the default cursor (0).
TGIS_Layer.NameLayer name.
TGIS_Layer.CSCoordinate Reference System (CRS) assigned to the layer.
TGIS_LayerVector.ParamsReturns the vector rendering parameters object for the layer.
TGIS_ParamsAreaParameters that are common for area features.
TGIS_Shape.MakeEditableMake the shape editable by materializing mutable shape data when necessary.
TGIS_Shape.IsSelectedShape is selected in the layer.
TGIS_Shape.LockLocks the shape for batch geometry updates to defer expensive recalculations.
TGIS_Shape.UnlockUnlocks the shape and applies deferred geometry updates.
TGIS_Shape.AddPartStarts a new part in a multipart shape geometry.
TGIS_Shape.AddPointAdds a 2D vertex to the current part of the shape.

Code

This sample is available on the following platforms (click to view the source code on GitHub):

2026/07/08 06:04

Page Tools