Class ST_SnapToGrid
- java.lang.Object
-
- org.h2gis.api.AbstractFunction
-
- org.h2gis.api.DeterministicScalarFunction
-
- org.h2gis.functions.spatial.generalize.ST_SnapToGrid
-
- All Implemented Interfaces:
org.h2gis.api.Function,org.h2gis.api.ScalarFunction
public class ST_SnapToGrid extends org.h2gis.api.DeterministicScalarFunctionFunction to snap a geometry according a grid size- Author:
- Erwan Bocher, CNRS, 2024
-
-
Constructor Summary
Constructors Constructor Description ST_SnapToGrid()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.locationtech.jts.geom.Geometryexecute(org.locationtech.jts.geom.Geometry geometry, float cell_size)Reduce the geometry precision.StringgetJavaStaticMethod()static doublescaleFactorForDecimalPlaces(int decimalPlaces)Computes the scale factor for a given number of decimal places.-
Methods inherited from class org.h2gis.api.AbstractFunction
addProperty, getProperty, removeProperty
-
-
-
-
Method Detail
-
getJavaStaticMethod
public String getJavaStaticMethod()
-
execute
public static org.locationtech.jts.geom.Geometry execute(org.locationtech.jts.geom.Geometry geometry, float cell_size) throws SQLExceptionReduce the geometry precision. cell_size is resolution of grid to snap the points- Parameters:
geometry-cell_size-- Returns:
- Throws:
SQLException
-
scaleFactorForDecimalPlaces
public static double scaleFactorForDecimalPlaces(int decimalPlaces)
Computes the scale factor for a given number of decimal places.- Parameters:
decimalPlaces-- Returns:
- the scale factor
-
-