5️⃣
Cinchy Platform Documentation
Cinchy v5.8
Cinchy v5.8
  • Data Collaboration Overview
  • Release notes
    • Release notes
      • 5.9 release notes
      • 5.8 Release Notes
      • 5.7 Release Notes
      • 5.6 Release Notes
      • 5.5 Release Notes
      • 5.4 Release Notes
      • 5.3 Release Notes
      • 5.2 Release Notes
      • 5.1 Release Notes
      • 5.0 Release Notes
  • Support
  • Glossary
  • FAQ
  • Deployment guide
    • Deploying Cinchy
      • Plan your deployment
        • Deployment architecture
          • Kubernetes architecture
          • IIS architecture
        • Deployment prerequisites
          • Single Sign-On (SSO) integration
            • Enable TLS 1.2
            • Configure ADFS
            • AD Group Integration
      • Kubernetes
        • Disable your Kubernetes applications
        • Change your file storage configuration
        • Configure AWS IAM for Connections
        • Use Self-Signed SSL Certs (Kubernetes)
        • Deploy the CLI (Kubernetes)
      • IIS
  • Upgrade guide
    • Upgrade Cinchy
      • Cinchy Upgrade Utility
      • Kubernetes upgrades
        • v5.1 (Kubernetes)
        • v5.2 (Kubernetes)
        • v5.3 (Kubernetes)
        • v5.4 (Kubernetes)
        • v5.5 (Kubernetes)
        • v5.6 (Kubernetes)
        • v5.7 (Kubernetes)
        • v5.8 (Kubernetes)
        • Upgrade AWS EKS Kubernetes version
        • Update the Kubernetes Image Registry
        • Upgrade Azure Kubernetes Service (AKS)
      • IIS upgrades
        • v4.21 (IIS)
        • v4.x to v5.x (IIS)
        • v5.1 (IIS)
        • v5.2 (IIS)
        • v5.3 (IIS)
        • v5.4 (IIS)
        • v5.5 (IIS)
        • v5.6 (IIS)
        • v5.7 (IIS)
        • v5.8 (IIS)
      • Upgrading from v4 to v5
  • Guides for using Cinchy
    • User Guide
      • Data Browser overview
      • The Admin panel
      • User preferences
        • Personal access tokens
      • Table features
      • Data management
      • Queries
      • Version management
        • Versioning best practices
      • Commentary
    • Builder Guide
      • Best practices
      • Create tables
        • Attach files
        • Columns
        • Data controls
          • Data entitlements
          • Data erasure
          • Data compression
        • Formatting rules
        • Indexing & partitioning
        • Linking data
        • Table and column GUIDs
        • System tables
      • Delete tables
        • Restore tables, columns, and rows
      • Saved queries
      • CinchyDXD
        • Overview
        • DXD workflow
        • Package the data experience
        • Install the data experience
        • Release package
        • Changelog
        • References
          • Cinchy DXD CLI reference
          • Data Experience Definitions table
          • Data Experience Reference table
      • Multilingual support
      • Integration guides
    • Administrator Guide
    • Additional guides
      • Monitor and Log on Kubernetes
        • Grafana
        • OpenSearch dashboards
          • Set up Alerts
        • Monitor via ArgoCD
      • Maintenance
      • Cinchy Secrets Manager
      • GraphQL (Beta)
      • System properties
      • Enable Data At Rest Encryption (DARE)
      • Application experiences
        • Network map
          • Custom node results
          • Custom results in the Network Map
        • Set up experiences
  • API Guide
    • API overview
      • API authentication
      • API saved queries
      • ExecuteCQL
      • Webhook ingestion
  • CQL
    • Overview
      • CQL examples
      • CQL statements overview
        • Cinchy DML statements
        • Cinchy DDL statements
      • Cinchy supported functions
        • Cinchy functions
        • Cinchy system values
        • Cinchy User Defined Functions (UDFs)
          • Table-valued functions
          • Scalar-valued functions
        • Conversion functions
        • Date and Time types and functions
          • Return System Date and Time values
          • Return Date and Time parts
          • Return Date and Time values from their parts
          • Return Date and Time difference values
          • Modify Date and Time values
          • Validate Date and Time values
        • Logical functions
        • Math functions
        • String functions
        • Geometry and Geography data type and functions
          • OGC methods on Geometry & Geography instances
          • Extended methods on Geometry & Geography instances
        • Full Text Search functions
        • Connections functions
        • JSON functions
    • CQL functions reference list
  • Meta-Forms
    • Introduction
    • Install Meta-Forms
      • Deploy Meta-Forms (Kubernetes)
      • Deploy Meta-Forms (IIS)
    • Forms data types
    • Meta-Forms Builder Guide
      • Create a dynamic meta-form with tables
      • Create a dynamic meta-form example with Form Designer
      • Add links to a form
      • Rich text editing in forms
  • Data syncs
    • Get started with data syncs
    • IIS installation
      • Install Connections
      • Install the Worker/Listener
      • Install the Connections CLI
    • Build data syncs
      • Data sync types
      • Design patterns
      • Sync actions
      • Columns and mappings
        • Calculated column examples
      • Advanced settings
        • Filters
        • Variables
        • Auth requests
        • Request headers
        • Post sync scripts
        • Pagination
      • Batch data sync example
      • Real-time sync example
      • Schedule a data sync
      • Connection functions
    • Data sync sources
      • Cinchy Event Broker/CDC
        • Cinchy Event Broker/CDC XML config example
      • Cinchy Table
        • Cinchy Table XML config example
      • Cinchy Query
        • Cinchy Query XML config example
      • Copper
      • DB2 (query and table)
      • Dynamics 2015
      • Dynamics
      • DynamoDB
      • File-based sources
        • Binary file
        • Delimited file
        • Excel
        • Fixed width file
        • Parquet
      • Kafka Topic
        • Kafka Topic example config
        • Apache AVRO data format
      • LDAP
      • MongoDB collection
        • MongoDB collection source example
      • Mongo event
      • MongoDB collection (Cinchy event)
      • MS SQL Server (query and table)
      • ODBC Query
      • Oracle (query and table)
      • Polling event
        • Polling event example config
      • REST API
      • REST API (Cinchy event)
      • SAP SuccessFactors
      • Salesforce Object (Bulk API)
      • Salesforce platform event
      • Salesforce push topic
      • Snowflake
        • Snowflake source example config
      • SOAP 1.2 web service
      • SOAP 1.2 web service (Cinchy Event Triggered)
    • Data sync destinations
      • Cinchy Table
      • DB2 table
      • Dynamics
      • Kafka Topic
      • MongoDB collection
      • MS SQL Server table
      • Oracle table
      • REST API
      • Salesforce
      • Snowflake table
      • SOAP 1.2 web service
    • Real-time sync stream sources
      • The Listener Config table
      • Cinchy Event Broker/CDC
      • Data Polling
      • Kafka Topic
      • MongoDB
      • Salesforce Push Topic
      • Salesforce Platform Event
    • CLI commands list
    • Troubleshooting
  • Other Resources
    • Angular SDK
    • JavaScript SQK
Powered by GitBook
On this page
  • Overview
  • IsValidDetailed (Geometry)
  • Syntax
  • Return types
  • Remarks
  • MakeValid (Geometry)
  • Syntax
  • Return Types
  • Remarks
  • Reduce (Geometry)
  • Syntax
  • Arguments
  • Remarks
  • ShortestLineTo (Geometry)
  • Syntax
  • Arguments
  • Return types
  • Remarks
  1. CQL
  2. Overview
  3. Cinchy supported functions
  4. Geometry and Geography data type and functions

Extended methods on Geometry & Geography instances

Overview

Cinchy CQL supports several extended methods on Open Geospatial Consortium (OGC) methods on geometry and geography instances.

All functions that have Geometry in parenthesis are only applicable to OGC methods on geometry instances.

This function isn't currently supported in PostgreSQL deployments of the Cinchy platform. Please check back at a later time. For a full list of in-progress function translations, see the CQL functions reference page.

The extended Methods covered in this section are:

IsValidDetailed (Geometry)

IsValidDetailed()returns a message that can help to identify problems with a spatial object that's not valid.

Only the first error is returned, when the object isn't valid. When the object is valid, a value of 24400 is returned.

Syntax

.IsValidDetailed()

Return types

CQL: Text

Remarks

The following table contains possible return values:

Return Value
Description

24400

Valid

24401

Not valid, reason unknown.

24402

Not valid because point {0} is an isolated point, which isn't valid in this type of object.

24403

Not valid because some pair of polygon edges overlap.

24404

Not valid because polygon ring {0} intersects itself or some other ring.

24405

Not valid because some polygon ring intersects itself or some other ring.

24406

Not valid because curve {0} degenerates to a point.

24407

Not valid because polygon ring {0} collapses to a line at point {1}.

24408

Not valid because polygon ring {0} isn't closed.

24409

Not valid because some portion of polygon ring {0} lies in the interior of a polygon.

24410

Not valid because ring {0} is the first ring in a polygon of which it isn't the exterior ring.

24411

Not valid because ring {0} lies outside the exterior ring {1} of its polygon.

24412

Not valid because the interior of a polygon with rings {0} and {1} isn't connected.

24413

Not valid because of two overlapping edges in curve {0}.

24414

Not valid because an edge of curve {0} overlaps an edge of curve {1}.

24415

Not valid some polygon has an invalid ring structure.

24416

Not valid because in curve {0} the edge that starts at point {1} is either a line or a degenerate arc with antipodal endpoints

Example

This example of an invalid spatial object shows how the IsValidDetailed() methods behaves:

DECLARE @p GEOMETRY = 'Polygon((2 2, 4 4, 4 2, 2 4, 2 2))'
SELECT @p.IsValidDetailed()
--Returns: 24404: Not valid because polygon ring (1) intersects itself or some other ring.

MakeValid (Geometry)

MakeValid()converts an invalid geometry instance into a geometry instance with a valid Open Geospatial Consortium (OGC) type.

Syntax

.MakeValid ()

Return Types

CQL: geometry

Remarks

This method may cause a change in the type of the geometry instance, as well as cause the points of a geometry instance to shift slightly.

Example

This example creates an invalid LineString instance that overlaps itself and uses MakeValid() to make this instance valid:

DECLARE @g geometry;
SET @g = geometry::STGeomFromText('LINESTRING(0 2, 1 1, 1 0, 1 1, 2 2)', 0);
SET @g = @g.MakeValid();

Reduce (Geometry)

By running the Douglas-Peucker algorithm on the instance with the given tolerance, Reduce()returns an approximation of the given geometry instance produced.

Syntax

.Reduce ( tolerance )

Arguments

tolerance The tolerance (type float) to input for the approximation algorithm.

Return types

CQL: geometry

Remarks

This algorithm operates independently on each geometry contained in the instance, for collection types.

Doesn't modify Pointinstances.

For CircularStringinstances,Reduce() returns a LineString, CircularString, or CompoundCurve instance.

For CompoundCurveinstances,Reduce() returns either a CompoundCurveor LineStringinstance.

On Polygoninstances, the approximation algorithm is applied independently to each ring. If the returned Polygoninstance isn't valid, Reduce() will produce a FormatException.

When a circular arc segment is found, the approximation algorithm checks whether the arc can be approximated by its chord within half the given tolerance. Chords meeting this criteria have the circular arc replaced in the calculations by the chord. If a chord doesn't meet this criteria, then the circular arc is kept and the approximation algorithm is applied to the remaining segments.

Example

This example creates a LineString instance and uses Reduce() to simplify the instance:

DECLARE @g geometry;
SET @g = geometry::STGeomFromText('LINESTRING(0 0, 0 1, 1 0, 2 1, 3 0, 4 1)', 0);
SELECT @g.Reduce(.75).ToString();

ShortestLineTo (Geometry)

ShortestLineTo()returns a LineStringinstance (which is the distance between the two geometry instances) with two points that represent the shortest distance between the two geometry instances.

Syntax

.ShortestLineTo ( other_instance )

Arguments

other_instance Specifies the second geometry instance that the calling geometry instance is trying to determine the shortest distance to.

Return types

CQL: geometry

Remarks

Returns a LineString instance with endpoints lying on the borders of the two non-intersecting geometry instances being compared.

The length of the LineStringreturned equals the shortest distance between the two geometry instances.

Returns an empty LineStringinstance when the two geometry instances intersect each other.

Example

This example returns the LineString instance connecting the two points, by finding the shortest distance between a CircularString instance and a LineString instance:

 DECLARE @g1 geometry = 'CIRCULARSTRING(0 0, 1 2.1082, 3 6.3246, 0 7, -3 6.3246, -1 2.1082, 0 0)';
 DECLARE @g2 geometry = 'LINESTRING(-4 7, 7 10, 3 7)';
 SELECT @g1.ShortestLineTo(@g2).ToString();
PreviousOGC methods on Geometry & Geography instancesNextFull Text Search functions

Last updated 1 year ago

IsValidDetailed
MakeValid
Reduce
ShortestLineTo