Class 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 Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int findDimension​(Geometry g)
      Finds the coordinate dimension of a geometry.
      • Methods inherited from class Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

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