Class HanaDimensionFinder

Object
HanaDimensionFinder

public class HanaDimensionFinder extends Object
Find the coordinate dimension of a geometry instance.

JTS coordinate sequences are often three-dimensional, but their coordinates don't have a third ordinate (i.e. it is NaN). This class checks if all coordinate sequences in a geometry claiming to be three-dimensional really have a third ordinate.

Author:
Stefan Uhrig, SAP SE
  • Method Details

    • findDimension

      public static int findDimension(Geometry g)
      Finds the coordinate dimension of a geometry.
      Parameters:
      g - A geometry. Must not be null.
      Returns:
      Returns 3 iff all coordinate sequences in the geometry are three-dimensional and all their coordinates have a third ordinate different from NaN. Returns 2 otherwise.