• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Numeric Values
      • String Values
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Case Object
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
        • Geometry Statement
        • Geometry.area Function
        • Geometry.clear Function
        • Geometry.load Function
        • Geometry.maxLatitude Function
        • Geometry.maxLongitude Function
        • Geometry.minLatitude Function
        • Geometry.minLongitude Function
        • Geometry.perimeter Function
        • Geometry.save Function
        • Geometry.tracePolygon Function
        • Geometry.walkPolygon Function
        • Geometry.getProperty Function
        • Geometry.setProperty Function
        • JSON Representation
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • StringWriter Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
    • Text Templates
    • Templated Reporting System
    • HTML, Markdown, and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataManager>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Geometry.getProperty Function

Format
s = geometry_name.getProperty(property_name);
Description
The Geometry.getProperty function returns a string containing the current value associated with the Geometry object's property specified by the string expression property_name. If a Geometry object contains multiple features, the function returns the value of the first feature that contains a value for property_name. Property names are case sensitive.
Property values may be set using the Geometry.setProperty function. When reading a GeoJSON file using the Geometry.load function, property names and values are read from the properties section of GeoJSON features.
Return Value
The function returns a string with the property information. If no feature in the geometry has a value for the property, a blank string is returned.
Example
// Load geometry from a file
Geometry geom;
geom.
load("geom.geojson");

// Read the name property
string feature_name = geom.getProperty("name");

errmsg("This feature is named %s", feature_name);
See also: Geometry Object, Geometry.setProperty Function