• <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.perimeter Function

Format
d = geometry_name.perimeter();
Description
The Geometry.perimeter function computes the perimeter, in meters, of the polygons contained in the Geometry object named geometry_name. If the Geometry object contains multiple polygons, this function returns the sum of the perimeters of all of these polygons. Points and lines in the geometry are ignored, so if the geometry contains only points and lines, the perimeter will be zero.
The Geometry.perimeter function uses the Haversine formula to approximate the distance between points of the polygon and makes certain assumptions about the diameter and shape of the earth which may give slightly different results than the perimeter calculated by other software packages.
Return Value
The function returns the sum of perimeters of all polygons in the Geometry object in meters or default if the Geometry object is empty.
Example
// Declare a geometry
Geometry mygeometry;

// Capture polygon
mygeometry.tracePolygon();

// Compute the perimeter of the captured polygon
PERIMETER = mygeometry.perimeter();
See also: Geometry Object, Geometry.area Function