Class ST_Force3D

  • All Implemented Interfaces:
    org.h2gis.api.Function, org.h2gis.api.ScalarFunction

    public class ST_Force3D
    extends org.h2gis.api.DeterministicScalarFunction
    Forces a Geometry into 3D mode. z-coordinates set to 0 when z value is NaN, other z-coordinates are left untouched.
    Author:
    Erwan Bocher
    • Field Summary

      • Fields inherited from interface org.h2gis.api.Function

        PROP_NAME, PROP_REMARKS
      • Fields inherited from interface org.h2gis.api.ScalarFunction

        PROP_DETERMINISTIC
    • Constructor Summary

      Constructors 
      Constructor Description
      ST_Force3D()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.locationtech.jts.geom.GeometryCollection convert​(org.locationtech.jts.geom.GeometryCollection gc, double zValue)
      Force the dimension of the GeometryCollection and update correctly the coordinate dimension
      static org.locationtech.jts.geom.LinearRing convert​(org.locationtech.jts.geom.LinearRing linearRing, double zValue)
      Force the dimension of the LinearRing and update correctly the coordinate dimension
      static org.locationtech.jts.geom.LineString convert​(org.locationtech.jts.geom.LineString lineString, double zValue)
      Force the dimension of the LineString and update correctly the coordinate dimension
      static org.locationtech.jts.geom.MultiLineString convert​(org.locationtech.jts.geom.MultiLineString multiLineString, double zValue)
      Force the dimension of the MultiLineString and update correctly the coordinate dimension
      static org.locationtech.jts.geom.MultiPoint convert​(org.locationtech.jts.geom.MultiPoint mp, double zValue)
      Force the dimension of the MultiPoint and update correctly the coordinate dimension
      static org.locationtech.jts.geom.MultiPolygon convert​(org.locationtech.jts.geom.MultiPolygon multiPolygon, double zValue)
      Force the dimension of the MultiPolygon and update correctly the coordinate dimension
      static org.locationtech.jts.geom.Polygon convert​(org.locationtech.jts.geom.Polygon polygon, double zValue)
      Force the dimension of the Polygon and update correctly the coordinate dimension
      static org.locationtech.jts.geom.Geometry force​(org.locationtech.jts.geom.Geometry geom, double zValue)
      Force the dimension of the geometry and update correctly the coordinate dimension
      static org.locationtech.jts.geom.Geometry force3D​(org.locationtech.jts.geom.Geometry geom)
      Converts a XY geometry to XYZ.
      static org.locationtech.jts.geom.Geometry force3D​(org.locationtech.jts.geom.Geometry geom, double zValue)
      Converts a XY geometry to XYZ.
      String getJavaStaticMethod()  
      • Methods inherited from class org.h2gis.api.AbstractFunction

        addProperty, getProperty, removeProperty
      • Methods inherited from interface org.h2gis.api.Function

        getProperty
    • Constructor Detail

      • ST_Force3D

        public ST_Force3D()
    • Method Detail

      • getJavaStaticMethod

        public String getJavaStaticMethod()
      • force3D

        public static org.locationtech.jts.geom.Geometry force3D​(org.locationtech.jts.geom.Geometry geom)
        Converts a XY geometry to XYZ. If a geometry has no Z component, then a 0 Z coordinate is tacked on.
        Parameters:
        geom -
        Returns:
      • force3D

        public static org.locationtech.jts.geom.Geometry force3D​(org.locationtech.jts.geom.Geometry geom,
                                                                 double zValue)
        Converts a XY geometry to XYZ. If a geometry has no Z component, then a 0 Z coordinate is tacked on.
        Parameters:
        geom -
        zValue -
        Returns:
      • force

        public static org.locationtech.jts.geom.Geometry force​(org.locationtech.jts.geom.Geometry geom,
                                                               double zValue)
        Force the dimension of the geometry and update correctly the coordinate dimension
        Parameters:
        geom - the input geometry
        zValue - to update
        Returns:
      • convert

        public static org.locationtech.jts.geom.MultiPoint convert​(org.locationtech.jts.geom.MultiPoint mp,
                                                                   double zValue)
        Force the dimension of the MultiPoint and update correctly the coordinate dimension
        Parameters:
        mp -
        zValue -
        Returns:
      • convert

        public static org.locationtech.jts.geom.GeometryCollection convert​(org.locationtech.jts.geom.GeometryCollection gc,
                                                                           double zValue)
        Force the dimension of the GeometryCollection and update correctly the coordinate dimension
        Parameters:
        gc -
        zValue -
        Returns:
      • convert

        public static org.locationtech.jts.geom.MultiPolygon convert​(org.locationtech.jts.geom.MultiPolygon multiPolygon,
                                                                     double zValue)
        Force the dimension of the MultiPolygon and update correctly the coordinate dimension
        Parameters:
        multiPolygon -
        zValue -
        Returns:
      • convert

        public static org.locationtech.jts.geom.MultiLineString convert​(org.locationtech.jts.geom.MultiLineString multiLineString,
                                                                        double zValue)
        Force the dimension of the MultiLineString and update correctly the coordinate dimension
        Parameters:
        multiLineString -
        zValue -
        Returns:
      • convert

        public static org.locationtech.jts.geom.Polygon convert​(org.locationtech.jts.geom.Polygon polygon,
                                                                double zValue)
        Force the dimension of the Polygon and update correctly the coordinate dimension
        Parameters:
        polygon -
        zValue -
        Returns:
      • convert

        public static org.locationtech.jts.geom.LineString convert​(org.locationtech.jts.geom.LineString lineString,
                                                                   double zValue)
        Force the dimension of the LineString and update correctly the coordinate dimension
        Parameters:
        lineString -
        zValue -
        Returns:
      • convert

        public static org.locationtech.jts.geom.LinearRing convert​(org.locationtech.jts.geom.LinearRing linearRing,
                                                                   double zValue)
        Force the dimension of the LinearRing and update correctly the coordinate dimension
        Parameters:
        linearRing -
        zValue -
        Returns: