[−][src]Function spatialite_sys::sanitize_geometry_column_r
pub unsafe extern "C" fn sanitize_geometry_column_r(
p_cache: *const c_void,
sqlite: *mut sqlite3,
table: *const c_char,
geom: *const c_char,
tmp_table: *const c_char,
report_path: *const c_char,
n_invalids: *mut c_int,
n_repaired: *mut c_int,
n_discarded: *mut c_int,
n_failures: *mut c_int,
err_msg: *mut *mut c_char
) -> c_int
Sanitizes a Geometry Column making all invalid geometries to be valid
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param sqlite handle to current DB connection \param table name of the table \param geometry name of the column to be checked \param tmp_table name of the temporary table \param report_path pathname of the report-file \param n_invalids if this variable is not NULL on successful completion will contain the total number of invalid Geometries found into the sanitize table \param n_repaired if this variable is not NULL on successful completion will contain the total number of repaired Geometries \param n_discarded if this variable is not NULL on successful completion will contain the total number of repaired Geometries (by discarding fragments) \param n_failures if this variable is not NULL on successful completion will contain the total number of repair failures (i.e. Geometries beyond possible repair) \param err_msg if this variable is not NULL and the return status is ZERO (failure), an appropriate error message will be returned
\sa sanitize_geometry_column, check_geometry_column, check_all_geometry_columns, sanitize_all_geometry_columns
\note this function will attempt to make valid all invalid geometries found within a Geometry Column (layer); a temporary table is required. \n if the process has full success the temprary table will be deleted; otherwise it will be preserved for further inspection. a HTML report will be produced as well. \n an eventual error message returned via err_msg requires to be deallocated by invoking free()\n reentrant and thread-safe.
\return 0 on failure, any other value on success