static void OGR2SQLITE_ST_Buffer(sqlite3_context* pContext, int argc, sqlite3_value** argv) { int nSRSId = -1; OGRGeometry* poGeom = OGR2SQLITE_GetGeom(pContext, argc, argv, &nSRSId); int bGotVal; double dfDist = OGR2SQLITE_GetValAsDouble(argv[1], &bGotVal); if( poGeom != NULL && bGotVal ) OGR2SQLITE_SetGeom_AndDestroy(pContext, poGeom->Buffer(dfDist), nSRSId); else sqlite3_result_null(pContext); delete poGeom; }