[][src]Function spatialite_sys::gaiaSnapToGrid

pub unsafe extern "C" fn gaiaSnapToGrid(
    geom: gaiaGeomCollPtr,
    origin_x: f64,
    origin_y: f64,
    origin_z: f64,
    origin_m: f64,
    size_x: f64,
    size_y: f64,
    size_z: f64,
    size_m: f64
) -> gaiaGeomCollPtr

Utility function: SnapToGrid

\param geom the input Geometry object. \param origin_x the X ccordinate identifying the Grid Origin. \param origin_y the Y coordinate identifiying the Grid Origin. \param origin_z the Z ccordinate identifying the Grid Origin. \param origin_m the M coordinate identifiying the Grid Origin. \param size_x Grid cell size (X axis). \param size_y Grid cell size (Y axis). \param size_z Grid cell size (Z axis). \param size_m Grid cell size (M axis).

\return the pointer to newly created Geometry object: NULL on failure. \n this function will return a modified geometry having all points snapped to a regular Grid defined by its origin and cell size. \n Consecutive points falling on the same cell will be removed, eventually returning NULL if \n output points are not enough to define a geometry of the given type. \n Collapsed geometries in a collection are stripped from it. \n Specify 0 as size for any dimension you don't want to snap to a grid. \n NULL will be returned if the passed argument is invalid.

\sa gaiaFreeGeomColl

\note you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSnapToGrid()